mirror of
https://github.com/frappe/books.git
synced 2024-12-25 12:10:06 +00:00
fix(ux): add items in system settings, move auto update to system
settings
This commit is contained in:
parent
0af2ce86f4
commit
ddec34aaec
@ -1,4 +1,5 @@
|
|||||||
const { DateTime } = require('luxon');
|
const { DateTime } = require('luxon');
|
||||||
|
const { _ } = require('frappejs/utils');
|
||||||
|
|
||||||
let dateFormatOptions = (() => {
|
let dateFormatOptions = (() => {
|
||||||
let formats = [
|
let formats = [
|
||||||
@ -8,15 +9,15 @@ let dateFormatOptions = (() => {
|
|||||||
'MM-dd-yyyy',
|
'MM-dd-yyyy',
|
||||||
'yyyy-MM-dd',
|
'yyyy-MM-dd',
|
||||||
'd MMM, y',
|
'd MMM, y',
|
||||||
'MMM d, y'
|
'MMM d, y',
|
||||||
];
|
];
|
||||||
|
|
||||||
let today = DateTime.local();
|
let today = DateTime.local();
|
||||||
|
|
||||||
return formats.map(format => {
|
return formats.map((format) => {
|
||||||
return {
|
return {
|
||||||
label: today.toFormat(format),
|
label: today.toFormat(format),
|
||||||
value: format
|
value: format,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
@ -35,7 +36,7 @@ module.exports = {
|
|||||||
fieldtype: 'Select',
|
fieldtype: 'Select',
|
||||||
options: dateFormatOptions,
|
options: dateFormatOptions,
|
||||||
default: 'MMM d, y',
|
default: 'MMM d, y',
|
||||||
required: 1
|
required: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: 'floatPrecision',
|
fieldname: 'floatPrecision',
|
||||||
@ -43,10 +44,28 @@ module.exports = {
|
|||||||
fieldtype: 'Select',
|
fieldtype: 'Select',
|
||||||
options: ['2', '3', '4', '5'],
|
options: ['2', '3', '4', '5'],
|
||||||
default: '2',
|
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: [
|
quickEditFields: [
|
||||||
'dateFormat'
|
'dateFormat',
|
||||||
]
|
'floatPrecision',
|
||||||
|
'hideGetStarted',
|
||||||
|
'autoUpdate',
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user