2
0
mirror of https://github.com/frappe/books.git synced 2024-12-25 04:06:04 +00:00

fix(ux): add items in system settings, move auto update to system

settings
This commit is contained in:
18alantom 2021-11-25 16:46:46 +05:30
parent 0af2ce86f4
commit ddec34aaec

View File

@ -1,4 +1,5 @@
const { DateTime } = require('luxon');
const { _ } = require('frappejs/utils');
let dateFormatOptions = (() => {
let formats = [
@ -8,15 +9,15 @@ let dateFormatOptions = (() => {
'MM-dd-yyyy',
'yyyy-MM-dd',
'd MMM, y',
'MMM d, y'
'MMM d, y',
];
let today = DateTime.local();
return formats.map(format => {
return formats.map((format) => {
return {
label: today.toFormat(format),
value: format
value: format,
};
});
})();
@ -35,7 +36,7 @@ module.exports = {
fieldtype: 'Select',
options: dateFormatOptions,
default: 'MMM d, y',
required: 1
required: 1,
},
{
fieldname: 'floatPrecision',
@ -43,10 +44,28 @@ module.exports = {
fieldtype: 'Select',
options: ['2', '3', '4', '5'],
default: '2',
required: 1
required: 1,
},
{
fieldname: 'hideGetStarted',
label: 'Hide Get Started',
fieldtype: 'Check',
default: 0,
},
{
fieldname: 'autoUpdate',
label: 'Auto Update',
fieldtype: 'Check',
default: 1,
description: _(
'Automatically check for updates and download them if available. The update will be applied after you restart the app.'
),
},
],
quickEditFields: [
'dateFormat'
]
'dateFormat',
'floatPrecision',
'hideGetStarted',
'autoUpdate',
],
};