mirror of
https://github.com/frappe/books.git
synced 2025-01-09 17:53:56 +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.InventorySettings,
|
||||||
ModelNameEnum.Defaults,
|
ModelNameEnum.Defaults,
|
||||||
ModelNameEnum.POSSettings,
|
ModelNameEnum.POSSettings,
|
||||||
|
ModelNameEnum.ERPNextSyncSettings,
|
||||||
ModelNameEnum.PrintSettings,
|
ModelNameEnum.PrintSettings,
|
||||||
ModelNameEnum.SystemSettings,
|
ModelNameEnum.SystemSettings,
|
||||||
].some((s) => this.fyo.singles[s]?.canSave);
|
].some((s) => this.fyo.singles[s]?.canSave);
|
||||||
@ -148,6 +149,7 @@ export default defineComponent({
|
|||||||
[ModelNameEnum.InventorySettings]: this.t`Inventory`,
|
[ModelNameEnum.InventorySettings]: this.t`Inventory`,
|
||||||
[ModelNameEnum.Defaults]: this.t`Defaults`,
|
[ModelNameEnum.Defaults]: this.t`Defaults`,
|
||||||
[ModelNameEnum.POSSettings]: this.t`POS Settings`,
|
[ModelNameEnum.POSSettings]: this.t`POS Settings`,
|
||||||
|
[ModelNameEnum.ERPNextSyncSettings]: this.t`ERPNext Sync`,
|
||||||
[ModelNameEnum.SystemSettings]: this.t`System`,
|
[ModelNameEnum.SystemSettings]: this.t`System`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -156,12 +158,15 @@ export default defineComponent({
|
|||||||
!!this.fyo.singles.AccountingSettings?.enableInventory;
|
!!this.fyo.singles.AccountingSettings?.enableInventory;
|
||||||
|
|
||||||
const enablePOS = !!this.fyo.singles.InventorySettings?.enablePointOfSale;
|
const enablePOS = !!this.fyo.singles.InventorySettings?.enablePointOfSale;
|
||||||
|
const enableERPNextSync =
|
||||||
|
!!this.fyo.singles.AccountingSettings?.enableERPNextSync;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
ModelNameEnum.AccountingSettings,
|
ModelNameEnum.AccountingSettings,
|
||||||
ModelNameEnum.InventorySettings,
|
ModelNameEnum.InventorySettings,
|
||||||
ModelNameEnum.Defaults,
|
ModelNameEnum.Defaults,
|
||||||
ModelNameEnum.POSSettings,
|
ModelNameEnum.POSSettings,
|
||||||
|
ModelNameEnum.ERPNextSyncSettings,
|
||||||
ModelNameEnum.PrintSettings,
|
ModelNameEnum.PrintSettings,
|
||||||
ModelNameEnum.SystemSettings,
|
ModelNameEnum.SystemSettings,
|
||||||
]
|
]
|
||||||
@ -173,6 +178,11 @@ export default defineComponent({
|
|||||||
if (s === ModelNameEnum.POSSettings && !enablePOS) {
|
if (s === ModelNameEnum.POSSettings && !enablePOS) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s === ModelNameEnum.ERPNextSyncSettings && !enableERPNextSync) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.map((s) => this.fyo.schemaMap[s]!);
|
.map((s) => this.fyo.schemaMap[s]!);
|
||||||
|
Loading…
Reference in New Issue
Block a user