Fix up some merge mistakes

This commit is contained in:
Bryan Ashby 2022-06-12 14:11:36 -06:00
parent e0fca9f8f7
commit c93b8cda81
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
3 changed files with 26 additions and 38 deletions

View File

@ -364,7 +364,6 @@ exports.ThemeManager = class ThemeManager {
const format = Config().theme.timeFormat[style] || 'h:mm a'; const format = Config().theme.timeFormat[style] || 'h:mm a';
return _.get(theme, `customization.defaults.timeFormat.${style}`, format); return _.get(theme, `customization.defaults.timeFormat.${style}`, format);
}, },
<<<<<<< HEAD
getDateTimeFormat : function(style = 'short') { getDateTimeFormat : function(style = 'short') {
const format = Config().theme.dateTimeFormat[style] || 'MM/DD/YYYY h:mm a'; const format = Config().theme.dateTimeFormat[style] || 'MM/DD/YYYY h:mm a';
return _.get(theme, `customization.defaults.dateTimeFormat.${style}`, format); return _.get(theme, `customization.defaults.dateTimeFormat.${style}`, format);
@ -376,16 +375,6 @@ exports.ThemeManager = class ThemeManager {
getStatusVisibleIndicators : function() { getStatusVisibleIndicators : function() {
const format = Config().theme.statusVisibleIndicators || [ 'Y', 'N' ]; const format = Config().theme.statusVisibleIndicators || [ 'Y', 'N' ];
return _.get(theme, 'customization.defaults.statusVisibleIndicators', format); return _.get(theme, 'customization.defaults.statusVisibleIndicators', format);
=======
getDateTimeFormat: function (style = 'short') {
const format =
Config().theme.dateTimeFormat[style] || 'MM/DD/YYYY h:mm a';
return _.get(
theme,
`customization.defaults.dateTimeFormat.${style}`,
format
);
>>>>>>> 7c01946d6e8ac0023e9692744803466aa96cbadf
}, },
}; };
} }

View File

@ -152,7 +152,8 @@ exports.getModule = class UserConfigModule extends MenuModule {
} else { } else {
self.client.log.info(`User "${self.client.user.username}" updated authentication credentials`); self.client.log.info(`User "${self.client.user.username}" updated authentication credentials`);
} }
); return self.prevMenu(cb);
});
} else { } else {
return self.prevMenu(cb); return self.prevMenu(cb);
} }

View File

@ -257,44 +257,42 @@ function ViewController(options) {
} }
}; };
this.applyViewConfig = function (config, cb) { this.applyViewConfig = function(config, cb) {
let highestId = 1; let highestId = 1;
let submitId; let submitId;
let initialFocusId = 1; let initialFocusId = 1;
async.each( async.each(Object.keys(config.mci || {}), function entry(mci, nextItem) {
Object.keys(config.mci || {}), const mciMatch = mci.match(MCI_REGEXP); // :TODO: How to handle auto-generated IDs????
function entry(mci, nextItem) { if(null === mciMatch) {
const mciMatch = mci.match(MCI_REGEXP); // :TODO: How to handle auto-generated IDs???? self.client.log.warn( { mci : mci }, 'Unable to parse MCI code');
if (null === mciMatch) { return;
self.client.log.warn({ mci: mci }, 'Unable to parse MCI code'); }
return;
}
const viewId = parseInt(mciMatch[2]); const viewId = parseInt(mciMatch[2]);
assert(!isNaN(viewId), 'Cannot parse view ID: ' + mciMatch[2]); // shouldn't be possible with RegExp used assert(!isNaN(viewId), 'Cannot parse view ID: ' + mciMatch[2]); // shouldn't be possible with RegExp used
if (viewId > highestId) { if(viewId > highestId) {
highestId = viewId; highestId = viewId;
} }
const view = self.getView(viewId); const view = self.getView(viewId);
if(!view) { if(!view) {
return nextItem(null); return nextItem(null);
} }
const mciConf = config.mci[mci]; const mciConf = config.mci[mci];
self.setViewPropertiesFromMCIConf(view, mciConf); self.setViewPropertiesFromMCIConf(view, mciConf);
if (mciConf.focus) { if(mciConf.focus) {
initialFocusId = viewId; initialFocusId = viewId;
} }
if (true === view.submit) { if(true === view.submit) {
submitId = viewId; submitId = viewId;
} }
nextItem(null); nextItem(null);
}, },
@ -305,10 +303,10 @@ function ViewController(options) {
if(highestIdView) { if(highestIdView) {
highestIdView.submit = true; highestIdView.submit = true;
} }
return cb(err, { initialFocusId: initialFocusId });
} }
);
return cb(err, { initialFocusId : initialFocusId } );
});
}; };
// method for comparing submitted form data to configuration entries // method for comparing submitted form data to configuration entries