mirror of
https://github.com/frappe/books.git
synced 2025-01-09 09:50:27 +00:00
feat: erpnextSync settings page
This commit is contained in:
parent
3d94b4b8ea
commit
c2d7644269
@ -129,6 +129,7 @@ export default defineComponent({
|
||||
ModelNameEnum.InventorySettings,
|
||||
ModelNameEnum.Defaults,
|
||||
ModelNameEnum.POSSettings,
|
||||
ModelNameEnum.ERPNextSyncSettings,
|
||||
ModelNameEnum.PrintSettings,
|
||||
ModelNameEnum.SystemSettings,
|
||||
].some((s) => this.fyo.singles[s]?.canSave);
|
||||
@ -148,6 +149,7 @@ export default defineComponent({
|
||||
[ModelNameEnum.InventorySettings]: this.t`Inventory`,
|
||||
[ModelNameEnum.Defaults]: this.t`Defaults`,
|
||||
[ModelNameEnum.POSSettings]: this.t`POS Settings`,
|
||||
[ModelNameEnum.ERPNextSyncSettings]: this.t`ERPNext Sync`,
|
||||
[ModelNameEnum.SystemSettings]: this.t`System`,
|
||||
};
|
||||
},
|
||||
@ -156,12 +158,15 @@ export default defineComponent({
|
||||
!!this.fyo.singles.AccountingSettings?.enableInventory;
|
||||
|
||||
const enablePOS = !!this.fyo.singles.InventorySettings?.enablePointOfSale;
|
||||
const enableERPNextSync =
|
||||
!!this.fyo.singles.AccountingSettings?.enableERPNextSync;
|
||||
|
||||
return [
|
||||
ModelNameEnum.AccountingSettings,
|
||||
ModelNameEnum.InventorySettings,
|
||||
ModelNameEnum.Defaults,
|
||||
ModelNameEnum.POSSettings,
|
||||
ModelNameEnum.ERPNextSyncSettings,
|
||||
ModelNameEnum.PrintSettings,
|
||||
ModelNameEnum.SystemSettings,
|
||||
]
|
||||
@ -173,6 +178,11 @@ export default defineComponent({
|
||||
if (s === ModelNameEnum.POSSettings && !enablePOS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s === ModelNameEnum.ERPNextSyncSettings && !enableERPNextSync) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
.map((s) => this.fyo.schemaMap[s]!);
|
||||
|
Loading…
Reference in New Issue
Block a user