@simitgroup/simpleapp-generator 1.5.0-alpha → 1.6.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +3 -1
  2. package/dist/buildinschemas/branch.d.ts.map +1 -1
  3. package/dist/buildinschemas/branch.js +10 -0
  4. package/dist/buildinschemas/branch.js.map +1 -1
  5. package/dist/buildinschemas/index.d.ts +2 -0
  6. package/dist/buildinschemas/index.d.ts.map +1 -1
  7. package/dist/buildinschemas/index.js +5 -1
  8. package/dist/buildinschemas/index.js.map +1 -1
  9. package/dist/buildinschemas/keyvaluepair.d.ts +3 -0
  10. package/dist/buildinschemas/keyvaluepair.d.ts.map +1 -0
  11. package/dist/buildinschemas/keyvaluepair.js +28 -0
  12. package/dist/buildinschemas/keyvaluepair.js.map +1 -0
  13. package/dist/buildinschemas/message.d.ts +3 -0
  14. package/dist/buildinschemas/message.d.ts.map +1 -0
  15. package/dist/buildinschemas/message.js +34 -0
  16. package/dist/buildinschemas/message.js.map +1 -0
  17. package/dist/buildinschemas/organization.d.ts.map +1 -1
  18. package/dist/buildinschemas/organization.js +18 -1
  19. package/dist/buildinschemas/organization.js.map +1 -1
  20. package/dist/buildinschemas/systemmessage.d.ts +3 -0
  21. package/dist/buildinschemas/systemmessage.d.ts.map +1 -0
  22. package/dist/buildinschemas/systemmessage.js +43 -0
  23. package/dist/buildinschemas/systemmessage.js.map +1 -0
  24. package/dist/framework.d.ts.map +1 -1
  25. package/dist/framework.js +3 -2
  26. package/dist/framework.js.map +1 -1
  27. package/dist/generate.d.ts.map +1 -1
  28. package/dist/generate.js +37 -9
  29. package/dist/generate.js.map +1 -1
  30. package/dist/processors/bpmnbuilder.d.ts.map +1 -1
  31. package/dist/processors/bpmnbuilder.js +23 -32
  32. package/dist/processors/bpmnbuilder.js.map +1 -1
  33. package/dist/processors/jrxmlbuilder.d.ts +3 -0
  34. package/dist/processors/jrxmlbuilder.d.ts.map +1 -0
  35. package/dist/processors/jrxmlbuilder.js +57 -0
  36. package/dist/processors/jrxmlbuilder.js.map +1 -0
  37. package/dist/type.d.ts +6 -0
  38. package/dist/type.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/src/buildinschemas/branch.ts +10 -0
  41. package/src/buildinschemas/index.ts +2 -0
  42. package/src/buildinschemas/keyvaluepair.ts +26 -0
  43. package/src/buildinschemas/organization.ts +18 -1
  44. package/src/buildinschemas/systemmessage.ts +42 -0
  45. package/src/framework.ts +3 -2
  46. package/src/generate.ts +41 -13
  47. package/src/processors/bpmnbuilder.ts +34 -38
  48. package/src/processors/jrxmlbuilder.ts +38 -0
  49. package/src/type.ts +7 -1
  50. package/templates/basic/nest/apischema.ts.eta +1 -1
  51. package/templates/basic/nest/controller.ts.eta +37 -19
  52. package/templates/basic/nest/resolver.ts.eta +1 -1
  53. package/templates/basic/nest/service.ts.eta +22 -4
  54. package/templates/basic/nest/type.ts.eta +2 -2
  55. package/templates/basic/nuxt/pages.form.vue.eta +1 -1
  56. package/templates/basic/nuxt/pages.mobile.landing.vue.eta +4 -61
  57. package/templates/nest/src/app.module.ts.eta +2 -0
  58. package/templates/nest/src/cloudapi/cloudapi.module.ts._eta +15 -0
  59. package/templates/nest/src/cloudapi/cloudapi.service.ts._eta +15 -0
  60. package/templates/nest/src/printapi/api/.gitignore.eta +4 -0
  61. package/templates/nest/src/printapi/api/.npmignore.eta +1 -0
  62. package/templates/nest/src/printapi/api/.openapi-generator/FILES.eta +8 -0
  63. package/templates/nest/src/printapi/api/.openapi-generator/VERSION.eta +1 -0
  64. package/templates/nest/src/printapi/api/.openapi-generator-ignore.eta +23 -0
  65. package/templates/nest/src/printapi/api/api.ts.eta +223 -0
  66. package/templates/nest/src/printapi/api/base.ts.eta +86 -0
  67. package/templates/nest/src/printapi/api/common.ts.eta +150 -0
  68. package/templates/nest/src/printapi/api/configuration.ts.eta +110 -0
  69. package/templates/nest/src/printapi/api/git_push.sh.eta +57 -0
  70. package/templates/nest/src/printapi/api/index.ts.eta +18 -0
  71. package/templates/nest/src/printapi/api/openapitools.json.eta +7 -0
  72. package/templates/nest/src/printapi/printapi.module.ts.eta +15 -0
  73. package/templates/nest/src/printapi/printapi.service.ts.eta +42 -0
  74. package/templates/nest/src/simpleapp/apischemas/index.ts._eta +25 -0
  75. package/templates/nest/src/simpleapp/generate/commons/robotuser.service.ts.eta +112 -0
  76. package/templates/nest/src/simpleapp/generate/commons/roles/roles.enum.ts.eta +7 -0
  77. package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +8 -5
  78. package/templates/nest/src/simpleapp/generate/processors/autoinc.processor.ts.eta +73 -0
  79. package/templates/nest/src/simpleapp/generate/processors/branch.processor.ts.eta +104 -0
  80. package/templates/nest/src/simpleapp/generate/processors/docno.processor.ts.eta +77 -0
  81. package/templates/nest/src/simpleapp/generate/processors/org.processor.ts.eta +115 -0
  82. package/templates/nest/src/simpleapp/generate/processors/perm.processor.ts.eta +71 -0
  83. package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +29 -9
  84. package/templates/nest/src/simpleapp/generate/processors/sysmsg.processor.ts.eta +49 -0
  85. package/templates/nest/src/simpleapp/generate/processors/tenant.processor.ts.eta +52 -0
  86. package/templates/nest/src/simpleapp/generate/types/index.ts.eta +0 -1
  87. package/templates/nest/src/simpleapp/generate/types/schema.type.ts.eta +191 -0
  88. package/templates/nest/src/simpleapp/generate/types/simpleapp.type.ts.eta +208 -6
  89. package/templates/nest/src/simpleapp/generate/workflow/workflow.config.ts.eta +1 -1
  90. package/templates/nest/src/simpleapp/generate/workflow/workflow.controller.ts.eta +2 -2
  91. package/templates/nest/src/simpleapp/generate/workflow/workflow.delegate.ts.eta +33 -28
  92. package/templates/nest/src/simpleapp/generate/workflow/workflow.service.ts.eta +107 -20
  93. package/templates/nest/src/simpleapp/generate/workflow/workflow.type.ts.eta +4 -4
  94. package/templates/nest/src/simpleapp/services/sysmsg.service.ts._etaxxx +43 -0
  95. package/templates/nest/src/simpleapp/services/userresolver.service.ts._eta +70 -0
  96. package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +10 -3
  97. package/templates/nest/src/simpleapp/types/index.ts._eta +11 -0
  98. package/templates/nest/src/simpleapp/workflows/listeners/simpleapp.listener.ts.eta +31 -0
  99. package/templates/nuxt/assets/primevue/passthrough.ts._eta +1 -1
  100. package/templates/nuxt/components/button/ButtonAction.vue._eta +11 -5
  101. package/templates/nuxt/components/form/{FormBranch.vue.eta → FormBranch.vue._eta} +1 -1
  102. package/templates/nuxt/components/image/ImageAvatar.vue.eta.vue +38 -0
  103. package/templates/nuxt/components/image/ImageOrganization.vue.eta.vue +40 -0
  104. package/templates/nuxt/components/image/ImageToBase64Uploader.vue.eta.vue +147 -0
  105. package/templates/nuxt/components/list/ListItem.vue.eta +24 -0
  106. package/templates/nuxt/components/list/ListMessages.vue.eta +89 -0
  107. package/templates/nuxt/components/simpleApp/SimpleAppAutocomplete.vue.eta +1 -1
  108. package/templates/nuxt/components/simpleApp/SimpleAppFormToolBar.vue._eta +93 -7
  109. package/templates/nuxt/components/text/TextBold.vue._eta +13 -0
  110. package/templates/nuxt/composables/getUserStore.generate.ts.eta +11 -2
  111. package/templates/nuxt/composables/graphquery.generate.ts.eta +7 -7
  112. package/templates/nuxt/composables/hotvalue.generate.ts.eta +30 -0
  113. package/templates/nuxt/composables/pusher.ts._eta +13 -0
  114. package/templates/nuxt/composables/stringHelper.generate.ts.eta +2 -3
  115. package/templates/nuxt/composables/sysmessage.generate.ts.eta +20 -0
  116. package/templates/nuxt/composables/workflow.generate.ts.eta +9 -4
  117. package/templates/nuxt/layouts/mobile.vue._eta +31 -42
  118. package/templates/nuxt/nuxt.config.ts._eta +2 -2
  119. package/templates/nuxt/othermodules.d.ts.eta +449 -0
  120. package/templates/nuxt/pages/[xorg]/mobile/organization/[id].vue._eta +40 -0
  121. package/templates/nuxt/pages/[xorg]/mobile/organization/{index.vue.eta → index.vue.aetaz} +16 -13
  122. package/templates/nuxt/pages/[xorg]/organization.vue.eta +21 -15
  123. package/templates/nuxt/plugins/40.pusher.ts.eta +18 -0
  124. package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +7 -1
  125. package/templates/nuxt/simpleapp/generate/commons/roles.ts.eta +4 -1
  126. package/templates/nuxt/types/schema.ts.eta +8 -1
  127. package/templates/nuxt/types/simpleappinput.ts.eta +3 -5
  128. package/templates/printformats/template.jrxml._eta +27 -0
  129. package/templates/project/groups/admin.json.eta +6 -1
  130. package/templates/project/jsonschemas/branch.json._eta +113 -0
  131. package/templates/project/jsonschemas/invoice.json._eta +5 -1
  132. package/templates/project/jsonschemas/organization.json._eta +111 -0
  133. package/templates/project/lang/default._json +70 -150
  134. package/templates/workflow/next/listener.ts.eta +6 -3
  135. package/tsconfig.tsbuildinfo +1 -1
  136. package/templates/nest/src/simpleapp/workflows/listeners/simpleapp.listener.ts._eta +0 -26
  137. /package/templates/nest/src/simpleapp/services/{autoinc.service.ts.eta → autoinc.service.ts.etaxx} +0 -0
  138. /package/templates/nest/src/simpleapp/services/{branch.service.ts.eta → branch.service.ts.etaxxx} +0 -0
  139. /package/templates/nest/src/simpleapp/services/{docno.service.ts.eta → docno.service.ts.etaxxx} +0 -0
  140. /package/templates/nest/src/simpleapp/services/{org.service.ts.eta → org.service.ts.etaxxx} +0 -0
  141. /package/templates/nest/src/simpleapp/services/{perm.service.ts.eta → perm.service.ts.etaxxx} +0 -0
  142. /package/templates/nest/src/simpleapp/services/{tenant.service.ts.eta → tenant.service.ts.etaxxx} +0 -0
@@ -1,44 +1,47 @@
1
1
  <template>
2
-
3
2
  <div class="w-full flex-col flex">
4
3
  <title>{{ t("organization") }}</title>
5
4
  <MobileToolbar class="bg-gray-600">
6
- <template #center><TextTitle class="text-white">{{ t("organization") }}</TextTitle></template>
5
+ <template #center
6
+ ><TextTitle class="text-white">{{
7
+ t("organization")
8
+ }}</TextTitle></template
9
+ >
7
10
  <template #end>
8
11
  <ButtonText @click="showEditOrg = true" class="text-white"
9
12
  ><i class="pi pi-pencil"></i
10
13
  ></ButtonText>
11
14
  </template>
12
15
  </MobileToolbar>
13
-
14
- <div class="w-full flex flex-row p-2 border-b border-gray-300 ">
16
+
17
+ <div class="w-full flex flex-row p-2 border-b border-gray-300">
15
18
  <div class="p-4">
16
19
  <div class="border w-12 h-12 md:w-24 md:h24"></div>
17
20
  </div>
18
- <div class="flex flex-col flex-1 ">
21
+ <div class="flex flex-col flex-1">
19
22
  <TextTitle>{{ data.orgName }} / {{ data.orgCode }}</TextTitle>
20
23
  <TextSubtitle>
21
24
  {{ data.description }}
22
- </TextSubtitle>
25
+ </TextSubtitle>
23
26
  </div>
24
27
  </div>
25
28
 
26
- <div class="w-full p-2 flex flex-col ">
27
-
29
+ <div class="w-full p-2 flex flex-col">
28
30
  <div class="flex flex-row justify-end">
29
- <TextTitle class="flex-1 p-2">{{ t('branches') }}</TextTitle>
31
+ <TextTitle class="flex-1 p-2">{{ t("branches") }}</TextTitle>
30
32
  <div>
31
33
  <ButtonPrimary @click="goBranch('new')">
32
34
  <i class="pi pi-plus"></i> <span>{{ t("addBranches") }}</span>
33
35
  </ButtonPrimary>
34
36
  </div>
35
37
  </div>
36
- <ListView class="border rounded-lg border-gray-400 dark:border-gray-600"
38
+ <ListView
39
+ class="border rounded-lg border-gray-400 dark:border-gray-600"
37
40
  :list="branchlist"
38
41
  title-field="branchName"
39
42
  sub-title-field="branchCode"
40
43
  :url="getDocumentUrl('organization', id)"
41
- #default="{item}"
44
+ #default="{ item }"
42
45
  >
43
46
  <div class="flex flex-row">
44
47
  <div class="flex-col flex flex-1">
@@ -50,7 +53,6 @@
50
53
  <renderer-boolean v-model="item.active"></renderer-boolean>
51
54
  </div>
52
55
  </div>
53
-
54
56
  </ListView>
55
57
  </div>
56
58
 
@@ -75,6 +77,7 @@
75
77
  * Author: Ks Tan
76
78
  */
77
79
  import { FormCrudEvent, SimpleAppInputType } from "~/types";
80
+ import { Branch } from "~/simpleapp/generate/openapi";
78
81
  import ConfirmPopup from "primevue/confirmpopup";
79
82
  import { useConfirm } from "primevue/useconfirm";
80
83
  const confirm = useConfirm();
@@ -87,7 +90,7 @@ const orgId = computed(() => <string>getUserProfile()?.orgRecordId);
87
90
  const doc = $OrganizationDoc();
88
91
  const brancdoc = $BranchDoc();
89
92
  const data = doc.getReactiveData();
90
- const branchlist = ref([]);
93
+ const branchlist = ref<Branch[]>([]);
91
94
  const isReadOnly = ref(true);
92
95
  const getCurrentOrg = async () => {
93
96
  await doc.getById(orgId.value);
@@ -1,44 +1,50 @@
1
1
  <template>
2
-
3
2
  <div class="w-full flex-col flex">
4
3
  <title>{{ t("organization") }}</title>
5
4
  <MobileToolbar class="bg-gray-600">
6
- <template #center><TextTitle class="text-white">{{ t("organization") }}</TextTitle></template>
5
+ <template #center
6
+ ><TextTitle class="text-white">{{
7
+ t("organization")
8
+ }}</TextTitle></template
9
+ >
7
10
  <template #end>
8
11
  <ButtonText @click="showEditOrg = true" class="text-white"
9
12
  ><i class="pi pi-pencil"></i
10
13
  ></ButtonText>
11
14
  </template>
12
15
  </MobileToolbar>
13
-
14
- <div class="w-full flex flex-row p-2 border-b border-gray-300 ">
15
- <div class="p-4">
16
- <div class="border w-12 h-12 md:w-24 md:h24"></div>
16
+
17
+ <div class="w-full flex flex-row p-2 border-b border-gray-300">
18
+ <div class="">
19
+ <!-- -->
20
+ <!-- <div class="border w-12 h-12 md:w-24 md:h24"> -->
21
+ <ImageOrganization :changable="!doc.isReadOnly()"></ImageOrganization>
22
+ <!-- </div> -->
17
23
  </div>
18
- <div class="flex flex-col flex-1 ">
24
+ <div class="flex flex-col flex-1">
19
25
  <TextTitle>{{ data.orgName }} / {{ data.orgCode }}</TextTitle>
20
26
  <TextSubtitle>
21
27
  {{ data.description }}
22
- </TextSubtitle>
28
+ </TextSubtitle>
23
29
  </div>
24
30
  </div>
25
31
 
26
- <div class="w-full p-2 flex flex-col ">
27
-
32
+ <div class="w-full p-2 flex flex-col">
28
33
  <div class="flex flex-row justify-end">
29
- <TextTitle class="flex-1 p-2">{{ t('branches') }}</TextTitle>
34
+ <TextTitle class="flex-1 p-2">{{ t("branches") }}</TextTitle>
30
35
  <div>
31
36
  <ButtonPrimary @click="goBranch('new')">
32
37
  <i class="pi pi-plus"></i> <span>{{ t("addBranches") }}</span>
33
38
  </ButtonPrimary>
34
39
  </div>
35
40
  </div>
36
- <ListView class="border rounded-lg border-gray-400 dark:border-gray-600"
41
+ <ListView
42
+ class="border rounded-lg border-gray-400 dark:border-gray-600"
37
43
  :list="branchlist"
38
44
  title-field="branchName"
39
45
  sub-title-field="branchCode"
40
46
  :url="getDocumentUrl('organization', id)"
41
- #default="{item}"
47
+ #default="{ item }"
42
48
  >
43
49
  <div class="flex flex-row">
44
50
  <div class="flex-col flex flex-1">
@@ -50,7 +56,6 @@
50
56
  <renderer-boolean v-model="item.active"></renderer-boolean>
51
57
  </div>
52
58
  </div>
53
-
54
59
  </ListView>
55
60
  </div>
56
61
 
@@ -75,6 +80,7 @@
75
80
  * Author: Ks Tan
76
81
  */
77
82
  import { FormCrudEvent, SimpleAppInputType } from "~/types";
83
+ import { Branch } from "~/simpleapp/generate/openapi";
78
84
  import ConfirmPopup from "primevue/confirmpopup";
79
85
  import { useConfirm } from "primevue/useconfirm";
80
86
  const confirm = useConfirm();
@@ -87,7 +93,7 @@ const orgId = computed(() => <string>getUserProfile()?.orgRecordId);
87
93
  const doc = $OrganizationDoc();
88
94
  const brancdoc = $BranchDoc();
89
95
  const data = doc.getReactiveData();
90
- const branchlist = ref([]);
96
+ const branchlist = ref<Branch[]>([]);
91
97
  const isReadOnly = ref(true);
92
98
  const getCurrentOrg = async () => {
93
99
  await doc.getById(orgId.value);
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was automatically generated by simpleapp generator. Every
3
+ * MODIFICATION OVERRIDE BY GENERATEOR
4
+ * last change 2024-02-23
5
+ * Author: Ks Tan
6
+ */
7
+ import { defineNuxtPlugin } from "#app";
8
+ import Pusher from 'pusher-js';
9
+ export default defineNuxtPlugin( async(nuxtApp) => {
10
+ const pusherkey = (useRuntimeConfig().app.PUSHER_KEY ?? '') as string
11
+ const pushercluster = (useRuntimeConfig().app.PUSHER_CLUSTER ?? '') as string
12
+ const pusher = new Pusher(pusherkey, { cluster: pushercluster,});
13
+ return {
14
+ provide: {
15
+ pusher:pusher
16
+ }
17
+ }
18
+ });
@@ -22,7 +22,8 @@ type crudType = {
22
22
  runUpdate: Function;
23
23
  runPatch: Function;
24
24
  runDelete: Function;
25
- runSearch: Function
25
+ runSearch: Function;
26
+ runDefault:Function;
26
27
  };
27
28
  export class SimpleAppClient<
28
29
  TData extends { _id?: string,created?:string },
@@ -77,6 +78,11 @@ export class SimpleAppClient<
77
78
  });
78
79
  }
79
80
 
81
+
82
+ async runDefault(){
83
+ const res = await this.docapi.runDefault()
84
+ return res.data
85
+ }
80
86
  async create() {
81
87
  const errors = this.validateFailed();
82
88
  const {$event} =useNuxtApp()
@@ -8,11 +8,14 @@ type roletype = {resource:string, action:string}
8
8
  const allroles:roletype[] = [
9
9
  <% for(let i=0;i<it.modules.length; i++){ %>
10
10
  <% const m = it.modules[i] %>
11
+ {resource: '<%=m.docname%>', action:'access'},
11
12
  {resource: '<%=m.docname%>', action:'create'},
12
13
  {resource: '<%=m.docname%>', action:'update'},
13
14
  {resource: '<%=m.docname%>', action:'delete'},
14
15
  {resource: '<%=m.docname%>', action:'search'},
15
-
16
+ <%if(m.schema['x-simpleapp-config']['printFormats']){%>
17
+ {resource: '<%=m.docname%>', action:'print'},
18
+ <%}%>,
16
19
 
17
20
  <% if(m.api && m.api.length >0) {%>
18
21
 
@@ -46,8 +46,15 @@ export type SchemaConfig = {
46
46
  documentType: string
47
47
  documentName: string
48
48
  collectionName?: string
49
- foreignKeys?:MyForeignKey,
49
+ foreignKeys?:MyForeignKey
50
+ printFormats?: SchemaPrintFormat[]
50
51
  }
52
+
53
+ export type SchemaPrintFormat = {
54
+ formatName: string
55
+ formatId: string
56
+ description?: string
57
+ }
51
58
  export type MyForeignKey = {
52
59
  [collectionname:string]:string[]
53
60
  }
@@ -58,13 +58,11 @@ export type FormActions = {
58
58
  [key:string]:string[]
59
59
  }
60
60
 
61
-
62
61
  export type FormMenu = {
63
- type:string
64
- action:string
65
- label:string
62
+ type?:string
63
+ action?:string
64
+ label?: string | ((...args: any) => string) | undefined
66
65
  command? : Function
67
66
  event?:FormCrudEvent
68
67
  [key:string] : any
69
68
  }
70
-
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Created with simpleapp generator -->
3
+ <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="<%=it.formatName%>" pageWidth="595" pageHeight="420" orientation="Landscape" columnWidth="380" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d0a16255-a928-4987-a618-d8b2c6a4728a">
4
+ <property name="com.jaspersoft.studio.report.description" value="<%=it.description%>"/>
5
+
6
+ <queryString>
7
+ <![CDATA[]]>
8
+ </queryString>
9
+ <background>
10
+ <band splitType="Stretch"/>
11
+ </background>
12
+ <detail><band splitType="Stretch"/></detail>
13
+ <noData>
14
+ <band height="380" splitType="Stretch">
15
+ <staticText>
16
+ <reportElement x="0" y="0" width="555" height="380" uuid="0fd432f8-6d4b-49cc-ac6c-1de5b660275b"/>
17
+ <box>
18
+ <pen lineWidth="0.75"/>
19
+ </box>
20
+ <textElement textAlignment="Center" verticalAlignment="Middle">
21
+ <font size="29"/>
22
+ </textElement>
23
+ <text><![CDATA[this is <%=it.formatName%> (<%=it.formatId%>) printformat, please change it]]></text>
24
+ </staticText>
25
+ </band>
26
+ </noData>
27
+ </jasperReport>
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "Autoincreament": [
3
+ "access",
3
4
  "create",
4
5
  "update",
5
6
  "delete",
@@ -7,31 +8,35 @@
7
8
  "generateNextNo"
8
9
  ],
9
10
  "Branch": [
11
+ "access",
10
12
  "create",
11
13
  "update",
12
14
  "delete",
13
15
  "search"
14
16
  ],
15
17
  "Organization": [
18
+ "access",
16
19
  "create",
17
20
  "update",
18
21
  "search",
19
22
  "delete"
20
23
  ],
21
24
  "Permission": [
22
- "listUser",
25
+ "access",
23
26
  "search",
24
27
  "delete",
25
28
  "update",
26
29
  "create"
27
30
  ],
28
31
  "Tenant": [
32
+ "access",
29
33
  "create",
30
34
  "update",
31
35
  "delete",
32
36
  "search"
33
37
  ],
34
38
  "User": [
39
+ "access",
35
40
  "create",
36
41
  "update",
37
42
  "search",
@@ -0,0 +1,113 @@
1
+ {
2
+ "type": "object",
3
+ "x-simpleapp-config": {
4
+ "isolationType": "org",
5
+ "documentType": "branch",
6
+ "documentName": "branch",
7
+ "uniqueKey": "branchCode",
8
+ "uniqueKeys": [
9
+ [
10
+ "branchId"
11
+ ]
12
+ ],
13
+ "documentTitle": "branchName",
14
+ "additionalAutoCompleteFields": [
15
+ "branchId"
16
+ ]
17
+ },
18
+ "properties": {
19
+ "_id": {
20
+ "type": "string"
21
+ },
22
+ "created": {
23
+ "type": "string"
24
+ },
25
+ "updated": {
26
+ "type": "string"
27
+ },
28
+ "createdBy": {
29
+ "type": "string"
30
+ },
31
+ "updatedBy": {
32
+ "type": "string"
33
+ },
34
+ "tenantId": {
35
+ "type": "integer",
36
+ "default": 1,
37
+ "minimum": 1
38
+ },
39
+ "orgId": {
40
+ "type": "integer",
41
+ "default": 1,
42
+ "minimum": 1
43
+ },
44
+ "branchId": {
45
+ "type": "integer",
46
+ "default": 1,
47
+ "minimum": 1
48
+ },
49
+ "organization": {
50
+ "type": "object",
51
+ "x-foreignkey": "organization",
52
+ "properties": {
53
+ "_id": {
54
+ "type": "string"
55
+ },
56
+ "code": {
57
+ "type": "string"
58
+ },
59
+ "label": {
60
+ "type": "string"
61
+ },
62
+ "orgId": {
63
+ "type": "integer"
64
+ }
65
+ }
66
+ },
67
+ "branchCode": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "branchName": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ },
75
+ "street1": {
76
+ "type": "string"
77
+ },
78
+ "street2": {
79
+ "type": "string"
80
+ },
81
+ "street3": {
82
+ "type": "string"
83
+ },
84
+ "street4": {
85
+ "type": "string"
86
+ },
87
+ "city": {
88
+ "type": "string"
89
+ },
90
+ "region": {
91
+ "type": "string"
92
+ },
93
+ "postcode": {
94
+ "type": "string"
95
+ },
96
+ "country": {
97
+ "type": "string"
98
+ },
99
+ "tel": {
100
+ "type": "string"
101
+ },
102
+ "email": {
103
+ "type": "string"
104
+ },
105
+ "active": {
106
+ "type": "boolean",
107
+ "default": true
108
+ },
109
+ "description": {
110
+ "type": "string"
111
+ }
112
+ }
113
+ }
@@ -15,7 +15,11 @@
15
15
  "jsonPath": "$.invoiceTotal",
16
16
  "formula": "sharelibs.getTotal(data.details)"
17
17
  }
18
- ]
18
+ ],
19
+ "printFormats":[
20
+ {"formatName":"invoice A4","formatId":"invoice-a4","description":""},
21
+ {"formatName":"invoice A5","formatId":"invoice-a5","description":""}
22
+ ],
19
23
  },
20
24
  "properties": {
21
25
  "_id": { "type": "string" },
@@ -0,0 +1,111 @@
1
+ {
2
+ "type": "object",
3
+ "x-simpleapp-config": {
4
+ "isolationType": "tenant",
5
+ "documentType": "org",
6
+ "documentName": "organization",
7
+ "pageType": "crud",
8
+ "uniqueKey": "orgCode",
9
+ "uniqueKeys": [
10
+ [
11
+ "orgId"
12
+ ]
13
+ ],
14
+ "documentTitle": "orgName",
15
+ "additionalAutoCompleteFields": [
16
+ "orgId"
17
+ ],
18
+ "additionalApis":[{
19
+ "action":"getlogo",
20
+ "entryPoint":"logo",
21
+ "requiredRole":[],
22
+ "method":"get",
23
+ "schema":"string",
24
+ "responseType":"String",
25
+ "description":"obtain avatar base64 jpg image"
26
+ },{
27
+ "action":"uploadlogo",
28
+ "entryPoint":"logo",
29
+ "requiredRole":[],
30
+ "method":"post",
31
+ "schema":"KeyValue",
32
+ "responseType":"String",
33
+ "description":"post avatar in base64 jpg image"
34
+ }]
35
+ },
36
+ "required": [
37
+ "orgId",
38
+ "orgCode",
39
+ "orgName"
40
+ ],
41
+ "properties": {
42
+ "_id": {
43
+ "type": "string"
44
+ },
45
+ "created": {
46
+ "type": "string"
47
+ },
48
+ "updated": {
49
+ "type": "string"
50
+ },
51
+ "createdBy": {
52
+ "type": "string"
53
+ },
54
+ "updatedBy": {
55
+ "type": "string"
56
+ },
57
+ "tenantId": {
58
+ "type": "integer",
59
+ "default": 1,
60
+ "minimum": 1
61
+ },
62
+ "orgId": {
63
+ "type": "integer",
64
+ "default": 1,
65
+ "minimum": 1
66
+ },
67
+ "branchId": {
68
+ "type": "integer",
69
+ "default": 1,
70
+ "minimum": 0
71
+ },
72
+ "orgCode": {
73
+ "type": "string",
74
+ "minLength": 1
75
+ },
76
+ "orgName": {
77
+ "type": "string"
78
+ },
79
+ "registrationNo": {
80
+ "type": "string"
81
+ },
82
+ "active": {
83
+ "type": "boolean",
84
+ "default": true
85
+ },
86
+ "description": {
87
+ "type": "string",
88
+ "format": "text"
89
+ },
90
+ "timeZone": {
91
+ "type": "string",
92
+ "examples": [
93
+ "Asia/Kuala_Lumpur"
94
+ ]
95
+ },
96
+ "offsetMinute": {
97
+ "type": "number",
98
+ "default": 0
99
+ },
100
+ "currency": {
101
+ "type": "string",
102
+ "minimum": 3,
103
+ "maximum": 3
104
+ },
105
+ "country": {
106
+ "type": "string",
107
+ "minimum": 2,
108
+ "maximum": 2
109
+ }
110
+ }
111
+ }