1// Configuration types based on Fieldpine JSON structure
2export interface FieldpineConfig {
12 UserInterfaceBackgroundColor?: Array<{
13 test_notpresent?: string;
14 test_find_PosUIBasePath?: string;
17 UserInterfaceSet: string;
18 UserInterfaceFriendlyName: string;
19 "UserInterfaceUrl.Selling": string;
20 "UserInterfaceUrl.Quote": string;
21 "UserInterfaceUrl.Config": string;
22 "UserInterfaceUrl.Menu": string;
23 "SiteHelpUrl.salesorders": string;
28// Default configuration based on CWA Standard
29export const defaultConfig: FieldpineConfig = {
30 minpos: parseInt(process.env.FIELDPINE_MIN_POS || '2370'),
31 mingds: parseInt(process.env.FIELDPINE_MIN_GDS || '264'),
32 uiname: process.env.FIELDPINE_UI_NAME || "CWA Standard",
33 password: process.env.NEXT_PUBLIC_DEMO_PASSWORD || "emu",
37 v: process.env.FIELDPINE_POS_UI_BASE_PATH || "https://a1.fieldpine.com/CartridgeWorld/Aus_Standard",
38 debug_v: "\\customers\\cwaus\\uistandard"
41 UserInterfaceBackgroundColor: [
43 test_notpresent: "UserInterfaceBackgroundColor",
44 test_find_PosUIBasePath: "aus_alpha",
48 test_find_PosUIBasePath: "uialpha",
49 test_notpresent: "UserInterfaceBackgroundColor",
53 test_notpresent: "UserInterfaceBackgroundColor",
54 test_find_PosUIBasePath: "aus_beta",
59 UserInterfaceFriendlyName: process.env.FIELDPINE_UI_FRIENDLY_NAME || "CWA Standard",
60 "UserInterfaceUrl.Selling": process.env.FIELDPINE_UI_SELLING_URL || "cwpos281.htm",
61 "UserInterfaceUrl.Quote": process.env.FIELDPINE_UI_QUOTE_URL || "cwPos281quote.htm",
62 "UserInterfaceUrl.Config": process.env.FIELDPINE_UI_CONFIG_URL || "MainConfig0.htm",
63 "UserInterfaceUrl.Menu": process.env.FIELDPINE_UI_MENU_URL || "MainMenuCw0.htm",
64 "SiteHelpUrl.salesorders": process.env.FIELDPINE_HELP_URL || "https://cwanz.docs.fieldpine.com/pagehelp_salesorders.htm",
65 "HttpTemplate.cwpos.js": "%posuibasepath%/cwpos.js",
66 "HttpTemplate.cwpos.css": "%posuibasepath%/cwpos.css",
67 "HttpTemplate.lookupcontactdetails": "field(html,%posuibasepath%/standard/lookupcontactdetails.htm)",
68 "HttpTemplate.newcontactcomment": "field(html,%posuibasepath%/standard/newcontactcomment.htm)",
69 "HttpTemplate.jobdocket": "field(html,%posuibasepath%/standard/jobdocket.htm)",
70 "HttpTemplate.cwpos281.htm": "%posuibasepath%/cwpos281.htm",
71 "HttpTemplate.cwpos281quote.htm": "%posuibasepath%/cwpos281quote.htm",
72 "HttpTemplate.mainconfig0.htm": "%posuibasepath%/mainconfig0.htm",
73 "HttpTemplate.mainmenucwagency.htm": "%posuibasepath%/mainmenucwagency.htm",
74 "HttpTemplate.cwposhelp.htm": "https://cwanz.docs.fieldpine.com/pos281help.htm",
75 "HttpTemplateHostHeader.cwanz.docs.fieldpine.com": {
77 Authorization: "BASIC " + (process.env.FIELDPINE_AUTH_HEADER || "dWx1cnU6YWxpY2U=")
80 "Receipt.1.Template": process.env.FIELDPINE_RECEIPT_TEMPLATE || "https://a1.fieldpine.com/CartridgeWorld/Aus_Standard/cwaus2.htm",
81 "Receipt.1.Template80mm": process.env.FIELDPINE_RECEIPT_TEMPLATE_80MM || "https://a1.fieldpine.com/CartridgeWorld/Aus_Standard/cwaus2_80mm.htm",
82 "Receipt.13.Template": process.env.FIELDPINE_RECEIPT_ACCOUNT_TEMPLATE || "https://a1.fieldpine.com/CartridgeWorld/Aus_Standard/cwaus2_Account.htm",
83 "HttpTemplate.fieldpinememoryapi1.js": "%posuibasepath%/standard/FieldpineMemoryApi1.js",
84 "HttpTemplate.mainmenucw0.htm": "%posuibasepath%/mainmenucw0.htm",
85 "Site.CWA.JobDocket": process.env.FIELDPINE_JOB_DOCKET_TEMPLATE || "https://a1.fieldpine.com/CartridgeWorld/Aus_Standard/cwaus2_jobdocket.htm",
86 "PosConfigSetup.Sales.CustDue": 1