Skip to content

Commit

Permalink
feat: device id field
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayitzme committed Dec 18, 2024
1 parent 9d3f0fd commit faf41ee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Doc } from 'fyo/model/doc';
import { HiddenMap } from 'fyo/model/types';

export class ERPNextSyncSettings extends Doc {
deviceID?: string;
endpoint?: string;
authToken?: string;
integrationAppVersion?: string;
Expand Down
9 changes: 7 additions & 2 deletions schemas/app/ERPNextSyncSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@
"isChild": false,
"isSubmittable": false,
"fields": [
{
"label": "Device ID",
"fieldname": "deviceID",
"fieldtype": "Data",
"readOnly": true,
"section": "Default"
},
{
"label": "API Endpoint",
"fieldname": "endpoint",
"fieldtype": "Data",
"required": true,
"section": "Default"
},
{
"label": "Auth Token",
"fieldname": "authToken",
"fieldtype": "Secret",
"required": true,
"section": "Default"
},
{
Expand Down
7 changes: 6 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ import { Shortcuts } from './utils/shortcuts';
import { routeTo } from './utils/ui';
import { useKeys } from './utils/vueUtils';
import { setDarkMode } from 'src/utils/theme';
import { initERPNSync, updateERPNSyncSettings } from './utils/erpnextSync';
import {
initERPNSync,
registerInstanceToERPNext,
updateERPNSyncSettings,
} from './utils/erpnextSync';
enum Screen {
Desk = 'Desk',
Expand Down Expand Up @@ -225,6 +229,7 @@ export default defineComponent({
await initializeInstance(filePath, false, countryCode, fyo);
await updatePrintTemplates(fyo);
await registerInstanceToERPNext(fyo);
await updateERPNSyncSettings(fyo);
initERPNSync(fyo);
await this.setDesk(filePath);
Expand Down

0 comments on commit faf41ee

Please sign in to comment.