2
0
mirror of https://github.com/frappe/books.git synced 2025-01-03 15:17:30 +00:00

feat: device id field

This commit is contained in:
akshayitzme 2024-12-18 17:47:58 +05:30
parent 9d3f0fd29b
commit faf41ee3c7
3 changed files with 14 additions and 3 deletions

View File

@ -2,6 +2,7 @@ import { Doc } from 'fyo/model/doc';
import { HiddenMap } from 'fyo/model/types'; import { HiddenMap } from 'fyo/model/types';
export class ERPNextSyncSettings extends Doc { export class ERPNextSyncSettings extends Doc {
deviceID?: string;
endpoint?: string; endpoint?: string;
authToken?: string; authToken?: string;
integrationAppVersion?: string; integrationAppVersion?: string;

View File

@ -5,18 +5,23 @@
"isChild": false, "isChild": false,
"isSubmittable": false, "isSubmittable": false,
"fields": [ "fields": [
{
"label": "Device ID",
"fieldname": "deviceID",
"fieldtype": "Data",
"readOnly": true,
"section": "Default"
},
{ {
"label": "API Endpoint", "label": "API Endpoint",
"fieldname": "endpoint", "fieldname": "endpoint",
"fieldtype": "Data", "fieldtype": "Data",
"required": true,
"section": "Default" "section": "Default"
}, },
{ {
"label": "Auth Token", "label": "Auth Token",
"fieldname": "authToken", "fieldname": "authToken",
"fieldtype": "Secret", "fieldtype": "Secret",
"required": true,
"section": "Default" "section": "Default"
}, },
{ {

View File

@ -70,7 +70,11 @@ import { Shortcuts } from './utils/shortcuts';
import { routeTo } from './utils/ui'; import { routeTo } from './utils/ui';
import { useKeys } from './utils/vueUtils'; import { useKeys } from './utils/vueUtils';
import { setDarkMode } from 'src/utils/theme'; import { setDarkMode } from 'src/utils/theme';
import { initERPNSync, updateERPNSyncSettings } from './utils/erpnextSync'; import {
initERPNSync,
registerInstanceToERPNext,
updateERPNSyncSettings,
} from './utils/erpnextSync';
enum Screen { enum Screen {
Desk = 'Desk', Desk = 'Desk',
@ -225,6 +229,7 @@ export default defineComponent({
await initializeInstance(filePath, false, countryCode, fyo); await initializeInstance(filePath, false, countryCode, fyo);
await updatePrintTemplates(fyo); await updatePrintTemplates(fyo);
await registerInstanceToERPNext(fyo);
await updateERPNSyncSettings(fyo); await updateERPNSyncSettings(fyo);
initERPNSync(fyo); initERPNSync(fyo);
await this.setDesk(filePath); await this.setDesk(filePath);