@simitgroup/simpleapp-generator 1.6.6-i-alpha → 1.6.6-k-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 (239) hide show
  1. package/ReleaseNote.md +7 -0
  2. package/dist/buildinschemas/docnoformat.js +6 -6
  3. package/dist/buildinschemas/docnoformat.js.map +1 -1
  4. package/dist/buildinschemas/documentevent.js +1 -1
  5. package/dist/buildinschemas/documentevent.js.map +1 -1
  6. package/dist/buildinschemas/organization.js +1 -1
  7. package/dist/buildinschemas/organization.js.map +1 -1
  8. package/dist/buildinschemas/tenant.js +1 -1
  9. package/dist/buildinschemas/tenant.js.map +1 -1
  10. package/dist/buildinschemas/user.js +2 -2
  11. package/dist/buildinschemas/user.js.map +1 -1
  12. package/dist/buildinschemas/webhook.d.ts.map +1 -1
  13. package/dist/buildinschemas/webhook.js +1 -0
  14. package/dist/buildinschemas/webhook.js.map +1 -1
  15. package/dist/framework.d.ts.map +1 -1
  16. package/dist/framework.js +30 -3
  17. package/dist/framework.js.map +1 -1
  18. package/dist/generate.d.ts.map +1 -1
  19. package/dist/generate.js +21 -20
  20. package/dist/generate.js.map +1 -1
  21. package/dist/index.js +0 -0
  22. package/dist/processors/jrxmlbuilder.js +3 -3
  23. package/dist/processors/jrxmlbuilder.js.map +1 -1
  24. package/dist/processors/jsonschemabuilder.d.ts.map +1 -1
  25. package/dist/processors/jsonschemabuilder.js +17 -10
  26. package/dist/processors/jsonschemabuilder.js.map +1 -1
  27. package/dist/type.d.ts +1 -1
  28. package/dist/type.d.ts.map +1 -1
  29. package/package.json +2 -3
  30. package/reset-install.sh +3 -0
  31. package/src/buildinschemas/docnoformat.ts +6 -6
  32. package/src/buildinschemas/documentevent.ts +1 -1
  33. package/src/buildinschemas/organization.ts +1 -1
  34. package/src/buildinschemas/tenant.ts +1 -1
  35. package/src/buildinschemas/user.ts +2 -2
  36. package/src/buildinschemas/webhook.ts +1 -0
  37. package/src/framework.ts +33 -5
  38. package/src/generate.ts +22 -20
  39. package/src/processors/jrxmlbuilder.ts +3 -3
  40. package/src/processors/jsonschemabuilder.ts +27 -14
  41. package/src/type.ts +1 -1
  42. package/templates/basic/nest/controller.ts.eta +6 -5
  43. package/templates/basic/nest/resolver.ts.eta +4 -2
  44. package/templates/basic/nest/service.ts.eta +5 -2
  45. package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +3 -3
  46. package/templates/nest/.gitignore.eta +4 -5
  47. package/templates/nest/src/{app.module.ts.eta → app.module.ts._eta} +2 -2
  48. package/templates/nest/src/{main.ts.eta → main.ts._eta} +2 -2
  49. package/templates/nest/src/printapi/printapi.service.ts.eta +7 -8
  50. package/templates/nest/src/simpleapp/.gitignore.eta +1 -1
  51. package/templates/nest/src/simpleapp/generate/commons/audittrail.service.ts.eta +2 -2
  52. package/templates/nest/src/simpleapp/generate/commons/customkeycloa.guard.ts.eta +14 -12
  53. package/templates/nest/src/simpleapp/generate/commons/customkeycloak.guard.ts.eta +36 -42
  54. package/templates/nest/src/simpleapp/generate/commons/docnogenerator.service.ts.eta +6 -3
  55. package/templates/nest/src/simpleapp/generate/commons/encryption.static.ts.eta +56 -61
  56. package/templates/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +65 -88
  57. package/templates/nest/src/simpleapp/generate/commons/robotuser.service.ts.eta +10 -9
  58. package/templates/nest/src/simpleapp/generate/commons/roles/roles.guard.ts.eta +10 -3
  59. package/templates/nest/src/simpleapp/generate/commons/runwebhook.service.ts.eta +71 -77
  60. package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +439 -293
  61. package/templates/nest/src/simpleapp/generate/processors/autoinc.processor.ts.eta +20 -5
  62. package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +423 -38
  63. package/templates/nest/src/simpleapp/profile/{profile.controller.ts.eta → profile.controller.ts._eta} +2 -2
  64. package/templates/nest/src/simpleapp/profile/{profile.service.ts.eta → profile.service.ts._eta} +2 -2
  65. package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +15 -4
  66. package/templates/nuxt/assets/css/style.css._eta +74 -28
  67. package/templates/nuxt/components/button/ButtonMultiple.vue._eta +1 -1
  68. package/templates/nuxt/components/calendar/{CalendarByResource.vue.eta → CalendarByResource.vue._eta} +2 -2
  69. package/templates/nuxt/components/calendar/{CalendarInput.vue.eta → CalendarInput.vue._eta} +3 -3
  70. package/templates/nuxt/components/calendar/{CalendarSmall.vue.eta → CalendarSmall.vue._eta} +13 -7
  71. package/templates/nuxt/components/debug/{DebugDocumentData.vue.eta → DebugDocumentData.vue._eta} +4 -5
  72. package/templates/nuxt/components/form/{FormDocnoformat.vue.eta → FormDocnoformat.vue._eta} +2 -1
  73. package/templates/nuxt/components/form/user/{FormUserPermission.vue.eta → FormUserPermission.vue._eta} +6 -0
  74. package/templates/nuxt/components/header/{HeaderBreadcrumb.vue.eta → HeaderBreadcrumb.vue._eta} +5 -5
  75. package/templates/nuxt/components/header/button/{HeaderButtonProfile.vue.eta → HeaderButtonProfile.vue._eta} +2 -2
  76. package/templates/nuxt/components/header/button/task/{HeaderButtonTaskList.vue.eta → HeaderButtonTaskList.vue._eta} +4 -4
  77. package/templates/nuxt/components/image/ImageAvatar.vue.eta +56 -0
  78. package/templates/nuxt/components/image/{ImageOrganization.vue.eta.vue → ImageOrganization.vue.eta} +15 -9
  79. package/templates/nuxt/components/image/{ImageToBase64Uploader.vue.eta.vue → ImageToBase64Uploader.vue.eta} +28 -18
  80. package/templates/nuxt/components/list/{ListDocumentTable.vue.eta → ListDocumentTable.vue._eta} +3 -3
  81. package/templates/nuxt/components/list/{ListItem.vue.eta → ListItem.vue._eta} +2 -2
  82. package/templates/nuxt/components/list/{ListMessages.vue.eta → ListMessages.vue._eta} +8 -2
  83. package/templates/nuxt/components/list/{ListView.vue.eta → ListView.vue._eta} +2 -2
  84. package/templates/nuxt/components/overlay/{OverlayPanelWithToolBar.vue.eta → OverlayPanelWithToolBar.vue._eta} +5 -5
  85. package/templates/nuxt/components/overlay/{OverlaySideBarCrud.vue.eta → OverlaySideBarCrud.vue._eta} +4 -4
  86. package/templates/nuxt/components/overlay/{OverlayViewer.vue.eta → OverlayViewer.vue._eta} +2 -2
  87. package/templates/nuxt/components/page/{PageDocList.vue.eta → PageDocList.vue._eta} +5 -5
  88. package/templates/nuxt/components/renderer/RendererDateAge.vue.eta +19 -0
  89. package/templates/nuxt/components/renderer/{RendererDateTime.vue.eta → RendererDateTime.vue._eta} +2 -2
  90. package/templates/nuxt/components/renderer/{RendererDocHistories.vue.eta → RendererDocHistories.vue._eta} +6 -0
  91. package/templates/nuxt/components/renderer/{RendererForeignKey.vue.eta → RendererForeignKey.vue._eta} +2 -2
  92. package/templates/nuxt/components/renderer/{RendererLink.vue.eta → RendererLink.vue._eta} +2 -2
  93. package/templates/nuxt/components/renderer/{RendererTime.vue.eta → RendererTime.vue._eta} +2 -2
  94. package/templates/nuxt/components/renderer/{RendererViewer.vue.eta → RendererViewer.vue._eta} +2 -2
  95. package/templates/nuxt/components/select/{SelectTemplate.vue.eta → SelectTemplate.vue._eta} +2 -2
  96. package/templates/nuxt/components/session/{SessionBlock.vue.eta → SessionBlock.vue._eta} +2 -2
  97. package/templates/nuxt/components/simpleApp/SimpleAppAutocomplete.vue.eta +55 -55
  98. package/templates/nuxt/components/simpleApp/SimpleAppCalendarInput.vue.eta +13 -11
  99. package/templates/nuxt/components/simpleApp/SimpleAppChildrenList.vue.eta +6 -3
  100. package/templates/nuxt/components/simpleApp/SimpleAppDocumentNo.vue.eta +33 -28
  101. package/templates/nuxt/components/simpleApp/SimpleAppFieldContainer.vue.eta +19 -28
  102. package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +113 -105
  103. package/templates/nuxt/components/simpleApp/SimpleAppInputTable.vue.eta +3 -3
  104. package/templates/nuxt/components/simpleApp/SimpleAppJsonSchemaForm.vue.eta +3 -16
  105. package/templates/nuxt/components/simpleApp/SimpleAppUserPicker.vue.eta +10 -12
  106. package/templates/nuxt/components/table/{TableDocuments.vue.eta → TableDocuments.vue._eta} +2 -2
  107. package/templates/nuxt/components/user/{UserButtonPermissionInfo.vue.eta → UserButtonPermissionInfo.vue._eta} +4 -4
  108. package/templates/nuxt/components/user/{UserInvitation.vue.eta → UserInvitation.vue._eta} +2 -2
  109. package/templates/nuxt/components/user/{UserProfileListItem.vue.eta → UserProfileListItem.vue._eta} +2 -2
  110. package/templates/nuxt/components/user/{UserTenantPicker.vue.eta → UserTenantPicker.vue._eta} +2 -2
  111. package/templates/nuxt/composables/getOpenApi.generate.ts.eta +11 -3
  112. package/templates/nuxt/composables/getUserStore.generate.ts.eta +1 -1
  113. package/templates/nuxt/composables/graphquery.generate.ts.eta +1 -1
  114. package/templates/nuxt/composables/recently.generate.ts.eta +0 -1
  115. package/templates/nuxt/composables/stringHelper.generate.ts.eta +5 -2
  116. package/templates/nuxt/nuxt.config.ts._eta +6 -5
  117. package/templates/nuxt/pages/[xorg]/docnoformat/[id].vue.eta +0 -1
  118. package/templates/nuxt/pages/[xorg]/{docnoformat.vue.eta → docnoformat.vue._eta} +1 -0
  119. package/templates/nuxt/pages/[xorg]/organization/[id].vue.eta +13 -9
  120. package/templates/nuxt/pages/[xorg]/organization/new.vue.eta +10 -12
  121. package/templates/nuxt/pages/[xorg]/{user.vue.eta → user.vue._eta} +2 -2
  122. package/templates/nuxt/pages/index.vue._eta +1 -1
  123. package/templates/nuxt/pages/{profile.vue.eta → profile.vue._eta} +2 -2
  124. package/templates/nuxt/plugins/10.simpleapp-event.ts.eta +6 -0
  125. package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +89 -12
  126. package/templates/nuxt/plugins/40.pusher.ts.eta +8 -5
  127. package/templates/nuxt/presets/lara/accordion/index.js +79 -0
  128. package/templates/nuxt/presets/lara/accordioncontent/index.js +3 -0
  129. package/templates/nuxt/presets/lara/accordionheader/index.js +11 -0
  130. package/templates/nuxt/presets/lara/accordionpanel/index.js +18 -0
  131. package/templates/nuxt/presets/lara/autocomplete/index.js +208 -0
  132. package/templates/nuxt/presets/lara/avatar/index.js +43 -0
  133. package/templates/nuxt/presets/lara/avatargroup/index.js +5 -0
  134. package/templates/nuxt/presets/lara/badge/index.js +47 -0
  135. package/templates/nuxt/presets/lara/badgedirective/index.js +43 -0
  136. package/templates/nuxt/presets/lara/blockui/index.js +4 -0
  137. package/templates/nuxt/presets/lara/breadcrumb/index.js +64 -0
  138. package/templates/nuxt/presets/lara/button/index.js +238 -0
  139. package/templates/nuxt/presets/lara/buttongroup/index.js +12 -0
  140. package/templates/nuxt/presets/lara/card/index.js +37 -0
  141. package/templates/nuxt/presets/lara/carousel/index.js +103 -0
  142. package/templates/nuxt/presets/lara/cascadeselect/index.js +199 -0
  143. package/templates/nuxt/presets/lara/checkbox/index.js +104 -0
  144. package/templates/nuxt/presets/lara/chip/index.js +42 -0
  145. package/templates/nuxt/presets/lara/colorpicker/index.js +123 -0
  146. package/templates/nuxt/presets/lara/confirmdialog/index.js +3 -0
  147. package/templates/nuxt/presets/lara/confirmpopup/index.js +56 -0
  148. package/templates/nuxt/presets/lara/contextmenu/index.js +126 -0
  149. package/templates/nuxt/presets/lara/datatable/index.js +403 -0
  150. package/templates/nuxt/presets/lara/dataview/index.js +28 -0
  151. package/templates/nuxt/presets/lara/datepicker/index.js +435 -0
  152. package/templates/nuxt/presets/lara/deferred/index.js +3 -0
  153. package/templates/nuxt/presets/lara/dialog/index.js +148 -0
  154. package/templates/nuxt/presets/lara/divider/index.js +67 -0
  155. package/templates/nuxt/presets/lara/dock/index.js +86 -0
  156. package/templates/nuxt/presets/lara/drawer/index.js +149 -0
  157. package/templates/nuxt/presets/lara/fieldset/index.js +84 -0
  158. package/templates/nuxt/presets/lara/fileupload/index.js +95 -0
  159. package/templates/nuxt/presets/lara/floatlabel/index.js +26 -0
  160. package/templates/nuxt/presets/lara/galleria/index.js +308 -0
  161. package/templates/nuxt/presets/lara/global.js +90 -0
  162. package/templates/nuxt/presets/lara/iconfield/index.js +27 -0
  163. package/templates/nuxt/presets/lara/image/index.js +206 -0
  164. package/templates/nuxt/presets/lara/index.js +234 -0
  165. package/templates/nuxt/presets/lara/inplace/index.js +27 -0
  166. package/templates/nuxt/presets/lara/inputgroup/index.js +5 -0
  167. package/templates/nuxt/presets/lara/inputgroupaddon/index.js +28 -0
  168. package/templates/nuxt/presets/lara/inputmask/index.js +39 -0
  169. package/templates/nuxt/presets/lara/inputnumber/index.js +167 -0
  170. package/templates/nuxt/presets/lara/inputotp/index.js +10 -0
  171. package/templates/nuxt/presets/lara/inputswitch/index.js +80 -0
  172. package/templates/nuxt/presets/lara/inputtext/index.js +54 -0
  173. package/templates/nuxt/presets/lara/knob/index.js +44 -0
  174. package/templates/nuxt/presets/lara/listbox/index.js +117 -0
  175. package/templates/nuxt/presets/lara/megamenu/index.js +198 -0
  176. package/templates/nuxt/presets/lara/menu/index.js +96 -0
  177. package/templates/nuxt/presets/lara/menubar/index.js +176 -0
  178. package/templates/nuxt/presets/lara/message/index.js +92 -0
  179. package/templates/nuxt/presets/lara/metergroup/index.js +96 -0
  180. package/templates/nuxt/presets/lara/multiselect/index.js +201 -0
  181. package/templates/nuxt/presets/lara/orderlist/index.js +13 -0
  182. package/templates/nuxt/presets/lara/organizationchart/index.js +137 -0
  183. package/templates/nuxt/presets/lara/overlaybadge/index.js +18 -0
  184. package/templates/nuxt/presets/lara/paginator/index.js +178 -0
  185. package/templates/nuxt/presets/lara/panel/index.js +91 -0
  186. package/templates/nuxt/presets/lara/panelmenu/index.js +127 -0
  187. package/templates/nuxt/presets/lara/password/index.js +72 -0
  188. package/templates/nuxt/presets/lara/picklist/index.js +52 -0
  189. package/templates/nuxt/presets/lara/popover/index.js +31 -0
  190. package/templates/nuxt/presets/lara/progressbar/index.js +55 -0
  191. package/templates/nuxt/presets/lara/progressspinner/index.js +51 -0
  192. package/templates/nuxt/presets/lara/radiobutton/index.js +104 -0
  193. package/templates/nuxt/presets/lara/rating/index.js +63 -0
  194. package/templates/nuxt/presets/lara/ripple/index.js +6 -0
  195. package/templates/nuxt/presets/lara/scrollpanel/index.js +77 -0
  196. package/templates/nuxt/presets/lara/scrolltop/index.js +26 -0
  197. package/templates/nuxt/presets/lara/select/index.js +240 -0
  198. package/templates/nuxt/presets/lara/selectbutton/index.js +16 -0
  199. package/templates/nuxt/presets/lara/skeleton/index.js +16 -0
  200. package/templates/nuxt/presets/lara/slider/index.js +137 -0
  201. package/templates/nuxt/presets/lara/speeddial/index.js +57 -0
  202. package/templates/nuxt/presets/lara/splitbutton/index.js +19 -0
  203. package/templates/nuxt/presets/lara/splitter/index.js +61 -0
  204. package/templates/nuxt/presets/lara/splitterpanel/index.js +5 -0
  205. package/templates/nuxt/presets/lara/step/index.js +62 -0
  206. package/templates/nuxt/presets/lara/stepitem/index.js +11 -0
  207. package/templates/nuxt/presets/lara/steplist/index.js +3 -0
  208. package/templates/nuxt/presets/lara/steppanels/index.js +3 -0
  209. package/templates/nuxt/presets/lara/stepper/index.js +13 -0
  210. package/templates/nuxt/presets/lara/steps/index.js +111 -0
  211. package/templates/nuxt/presets/lara/tab/index.js +42 -0
  212. package/templates/nuxt/presets/lara/tablist/index.js +8 -0
  213. package/templates/nuxt/presets/lara/tabmenu/index.js +73 -0
  214. package/templates/nuxt/presets/lara/tabpanel/index.js +3 -0
  215. package/templates/nuxt/presets/lara/tabpanels/index.js +3 -0
  216. package/templates/nuxt/presets/lara/tabs/index.js +5 -0
  217. package/templates/nuxt/presets/lara/tabview/index.js +156 -0
  218. package/templates/nuxt/presets/lara/tag/index.js +38 -0
  219. package/templates/nuxt/presets/lara/terminal/index.js +60 -0
  220. package/templates/nuxt/presets/lara/textarea/index.js +39 -0
  221. package/templates/nuxt/presets/lara/tieredmenu/index.js +121 -0
  222. package/templates/nuxt/presets/lara/timeline/index.js +81 -0
  223. package/templates/nuxt/presets/lara/toast/index.js +102 -0
  224. package/templates/nuxt/presets/lara/togglebutton/index.js +45 -0
  225. package/templates/nuxt/presets/lara/toggleswitch/index.js +80 -0
  226. package/templates/nuxt/presets/lara/toolbar/index.js +28 -0
  227. package/templates/nuxt/presets/lara/tooltip/index.js +46 -0
  228. package/templates/nuxt/presets/lara/tree/index.js +101 -0
  229. package/templates/nuxt/presets/lara/treeselect/index.js +102 -0
  230. package/templates/nuxt/presets/lara/treetable/index.js +305 -0
  231. package/templates/nuxt/providers/my-provider.ts.eta +1 -1
  232. package/templates/nuxt/server/api/profile/[...].ts.eta +4 -3
  233. package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +10 -20
  234. package/templates/nuxt/tailwind.config.ts._eta +4 -15
  235. package/templates/nuxt/types/schema.ts.eta +1 -1
  236. package/templates/nuxt/types/user.ts.eta +6 -1
  237. package/templates/project/jsonschemas/appintegration.json_eta +227 -0
  238. package/templates/project/sharelibs/validate.ts.eta +23 -0
  239. package/templates/nuxt/components/image/ImageAvatar.vue.eta._vue +0 -57
@@ -1,22 +1,20 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="readonly"
4
- class="p-3 border rounded-lg border-gray-300 dark:border-blue-900/40"
4
+ class="px-3 py-1.5 border rounded-lg border-gray-300 dark:border-blue-900/40 h-input"
5
5
  >
6
- <div>
7
- {{ modelValue && modelValue.fullName ? modelValue.fullName : "-" }}
8
- </div>
6
+ {{ modelValue && modelValue.fullName ? modelValue.fullName : "-" }}
9
7
  </div>
10
8
  <div
11
9
  v-else-if="modelValue !== undefined"
12
- class="p-3 border rounded-lg border-gray-300 dark:border-blue-900/40 relative"
10
+ class="py-1.5 px-3 border rounded-lg border-gray-300 dark:border-blue-900/40 relative h-input"
13
11
  >
14
12
  <div ref="autocompleteinput" readonly>
15
13
  {{ modelValue && modelValue.fullName ? modelValue.fullName : "-" }}
16
14
  </div>
17
15
 
18
16
  <div
19
- class="absolute h-full top-0 right-0 text-right text-white z-10 align-middle p-3"
17
+ class="absolute h-full top-0 right-0 text-right text-white z-10 align-middle py-1.5 pr-3"
20
18
  >
21
19
  <a
22
20
  class="pi pi-times rounded-full bg-slate-500 p-1 cursor-pointer text-xs"
@@ -62,7 +60,7 @@
62
60
  >
63
61
  <template #header>
64
62
  <slot name="header">
65
- <div class="flex flex-row font font-bold dark:text-white">
63
+ <div class="flex flex-row font font-bold">
66
64
  <div>{{ t("user") }}</div>
67
65
  </div>
68
66
  </slot>
@@ -72,7 +70,7 @@
72
70
  </template>
73
71
  <template #option="{ index, option }">
74
72
  <slot name="option" :index="index" :option="option">
75
- <div class="flex flex-row dark:text-white">
73
+ <div class="flex flex-row">
76
74
  <div>{{ option.label }}</div>
77
75
  </div>
78
76
  </slot>
@@ -90,7 +88,7 @@
90
88
  <InputGroupAddon
91
89
  @click="showAutocompleteDialog(true)"
92
90
  v-ripple
93
- class="bg bg-primary-600 dark:bg-primary-700 text-white rounded-r-lg p-3"
91
+ class="bg bg-primary-600 text-white rounded-r-lg p-3"
94
92
  >
95
93
  <i :class="`pi ${modelValue ? 'pi-link' : 'pi-angle-down'}`"></i>
96
94
  </InputGroupAddon>
@@ -261,7 +259,7 @@ const getListFromAutocompleteApi = (event: any) => {
261
259
  getDocumentApi("user")
262
260
  .autoComplete(keyword, morefilter)
263
261
  .then((res: any) => {
264
- console.log("Run autocomplete?");
262
+ // console.log("Run autocomplete?");
265
263
  list.value = res.data;
266
264
 
267
265
  if (props.allowAddNew) {
@@ -364,7 +362,7 @@ const afterRenderMobileForm = async (
364
362
  data: any,
365
363
  result: any,
366
364
  ) => {
367
- console.log("afterRenderMobileForm", eventType);
365
+ // console.log("afterRenderMobileForm", eventType);
368
366
  if (eventType == FormCrudEvent.create || eventType == FormCrudEvent.update) {
369
367
  autocompleteitem.value = {
370
368
  _id: data._id,
@@ -381,7 +379,7 @@ const afterRenderMobileForm = async (
381
379
  };
382
380
 
383
381
  const clickAutocomplete = (a, b) => {
384
- console.log("clickAutocomplete", a, b);
382
+ // console.log("clickAutocomplete", a, b);
385
383
  return false;
386
384
  };
387
385
  </script>
@@ -97,8 +97,8 @@
97
97
  </template>
98
98
  <script setup lang="ts" generic="T">
99
99
  /**
100
- * This file was automatically generated by simpleapp generator. Every
101
- * MODIFICATION OVERRIDE BY GENERATEOR
100
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
101
+ * --remove-this-line-to-prevent-override--
102
102
  * last change 2023-10-28
103
103
  * Author: Ks Tan
104
104
  */
@@ -3,7 +3,7 @@
3
3
  <button class="" @click="previewPermission">
4
4
  <i class="pi pi-question-circle"></i>
5
5
  </button>
6
- <Sidebar
6
+ <Drawer
7
7
  v-model:visible="showpermissioninfo"
8
8
  modal
9
9
  :pt="{ root: { class: 'w-2/3' } }"
@@ -86,13 +86,13 @@
86
86
  </div>
87
87
  </div>
88
88
  </div>
89
- </Sidebar>
89
+ </Drawer>
90
90
  </div>
91
91
  </template>
92
92
  <script setup lang="ts">
93
93
  /**
94
- * This file was automatically generated by simpleapp generator. Every
95
- * MODIFICATION OVERRIDE BY GENERATEOR
94
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
95
+ * --remove-this-line-to-prevent-override--
96
96
  * last change 2023-10-28
97
97
  * Author: Ks Tan
98
98
  */
@@ -27,8 +27,8 @@
27
27
  </template>
28
28
  <script setup lang="ts">
29
29
  /**
30
- * This file was automatically generated by simpleapp generator. Every
31
- * MODIFICATION OVERRIDE BY GENERATEOR
30
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
31
+ * --remove-this-line-to-prevent-override--
32
32
  * last change 2023-10-28
33
33
  * Author: Ks Tan
34
34
  */
@@ -33,8 +33,8 @@
33
33
  </template>
34
34
  <script setup lang="ts">
35
35
  /**
36
- * This file was automatically generated by simpleapp generator. Every
37
- * MODIFICATION OVERRIDE BY GENERATEOR
36
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
37
+ * --remove-this-line-to-prevent-override--
38
38
  * last change 2023-10-28
39
39
  * Author: Ks Tan
40
40
  */
@@ -31,8 +31,8 @@
31
31
  </template>
32
32
  <script setup lang="ts">
33
33
  /**
34
- * This file was automatically generated by simpleapp generator. Every
35
- * MODIFICATION OVERRIDE BY GENERATEOR
34
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
35
+ * --remove-this-line-to-prevent-override--
36
36
  * last change 2023-10-28
37
37
  * Author: Ks Tan
38
38
  */
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import * as o from "../simpleapp/generate/openapi";
9
- import axios from 'axios'
9
+ import axios, { AxiosInstance } from 'axios'
10
10
 
11
11
 
12
12
  export const getAxiosConfig = () => {
@@ -15,15 +15,23 @@ export const getAxiosConfig = () => {
15
15
 
16
16
  const suffix = xorgdecode.includes('-') ? '/'+getCurrentXorg() : ''
17
17
  const config: o.Configuration = {
18
- basePath: `${useRuntimeConfig().public.APP_URL}/api${suffix}`,
18
+ basePath: `${useRuntimeConfig().public.appUrl}/api${suffix}`,
19
19
  isJsonMime: () => true,
20
20
  };
21
21
  return config
22
22
  }
23
23
 
24
+ export const getDocumentApiClass = <T>(ApiClass: new (config: o.Configuration, basePath?: string, axios?: AxiosInstance) => T): T => {
25
+ const config = getAxiosConfig();
26
+ const axios = useNuxtApp().$axios;
27
+ const api = new ApiClass(config, undefined, axios);
28
+ return api;
29
+ }
30
+
31
+
24
32
  //get apisession exclude from shared axios to separate handle session
25
33
  export const getApiSession = async ()=> {
26
- console.log("getApiSession from computable")
34
+ // console.log("getApiSession from computable")
27
35
  return getUserStore().pingSession()
28
36
  //,useNuxtApp().$axios)
29
37
  // const profileapi = new o.PROFILEApi(getAxiosConfig(),undefined)
@@ -1,4 +1,4 @@
1
- import { getUserProfile } from './getUserStore.generate';
1
+ // import { getUserProfile } from './getUserStore.generate';
2
2
  /**
3
3
  * This file was automatically generated by simpleapp generator. Every
4
4
  * MODIFICATION OVERRIDE BY GENERATEOR
@@ -10,7 +10,7 @@ import { createHttpLink, } from '@apollo/client/core';
10
10
  export const setGraphqlServer=()=>{
11
11
  const apolloclient = useNuxtApp().$apollo.defaultClient
12
12
  const newlink = createHttpLink({
13
- uri: `${useRuntimeConfig().public.API_URL}/${getCurrentXorg()}/graphql`,
13
+ uri: `${useRuntimeConfig().public.apiUrl}/${getCurrentXorg()}/graphql`,
14
14
  })
15
15
  apolloclient.setLink(newlink)
16
16
  apolloclient.defaultOptions={
@@ -7,7 +7,6 @@ export const setRecentDocument = (key:string, value:RecentlyValue)=>{
7
7
  recent.forEach((value,key)=>{
8
8
  tmp[key]=value
9
9
  })
10
- console.log("JSON.stringify(tmp)",tmp)
11
10
  localStorage.setItem('recently', JSON.stringify(tmp)); // Store keys as an array
12
11
 
13
12
  }
@@ -23,7 +23,7 @@ export const md5=(s:string)=> new Md5().appendStr(s).end()
23
23
  // }
24
24
  export const getAvatarByUid = (id:string, size?:number):string=>{
25
25
  if(size===undefined)size=160
26
- return `${useRuntimeConfig().public.AVATAR_URL}/${md5(id)}?size=${size}`
26
+ return `${useRuntimeConfig().public.avatarUrl}/${md5(id)}?size=${size}`
27
27
  }
28
28
  export const updateAvatarVersion = ()=>{
29
29
  myAvatarVersion.value++
@@ -32,7 +32,10 @@ export const updateAvatarVersion = ()=>{
32
32
  export const getAvatarVersion = ()=>myAvatarVersion
33
33
 
34
34
  export const getDefaultLocale =()=> useNuxtApp().$i18n.defaultLocale
35
- export const t = (txt:string,options?:any):string => typeof txt !='string' ?'' : useNuxtApp().$i18n.t(txt.trim(),options)
35
+ export const t = (txt:string,options?:any):string => {
36
+ if (!txt || typeof txt !='string') return ''
37
+ return useNuxtApp().$i18n.t(txt.trim(),options)
38
+ }
36
39
  export const upperFirst = (str:string) => _.upperFirst(str)
37
40
  export const labelSorter = (a,b)=>{
38
41
  const nameA = a.label.toUpperCase(); // ignore upper and lowercase
@@ -72,7 +72,7 @@ export default defineNuxtConfig({
72
72
  '@nuxtjs/i18n',
73
73
  'dayjs-nuxt',
74
74
  '@sidebase/nuxt-auth',
75
- 'nuxt-primevue',
75
+ '@primevue/nuxt-module',
76
76
  '@nuxtjs/apollo',
77
77
  // '@nuxtjs/pwa', //cannot turn on, will cause nuxt cant start
78
78
  // "nuxt-security", //temporary avoid nuxt-security cause cors
@@ -125,7 +125,10 @@ export default defineNuxtConfig({
125
125
  options: {
126
126
  ripple: true,
127
127
  inputStyle: 'filled',
128
-
128
+ unstyled: true,
129
+ ptOptions: {
130
+ mergeProps: true,
131
+ },
129
132
  },
130
133
  components: {
131
134
  include: '*',
@@ -134,9 +137,7 @@ export default defineNuxtConfig({
134
137
  directives: {
135
138
  include: ['Ripple', 'Tooltip', 'Badge', 'FocusTrap']
136
139
  },
137
- cssLayerOrder: 'tailwind-base, primevue, tailwind-utilities',
138
- importPT: { as: 'SimpleAppPT', from: path.resolve(__dirname, './assets/primevue/passthrough.ts') },
139
-
140
+ importPT: { from: '../presets/lara/'},
140
141
 
141
142
  },
142
143
  // pinia: {
@@ -14,7 +14,6 @@ const doc = useNuxtApp().$DocnoformatDoc();
14
14
 
15
15
  const props = defineProps<{ _id: string }>();
16
16
  const after = (actionName: string, data: Docnoformat) => {
17
- console.log("Docnoformat capture after emits ", actionName);
18
17
  switch (actionName) {
19
18
  case "new":
20
19
  goTo(doc.getDocName(), "new");
@@ -32,6 +32,7 @@
32
32
  <script setup lang="ts">
33
33
  /**
34
34
  * This file was automatically generated by simpleapp generator.
35
+ * --remove-this-line-to-prevent-override--
35
36
  * last change 2023-09-09
36
37
  * author: Ks Tan
37
38
  */
@@ -14,24 +14,28 @@ const doc = useNuxtApp().$BranchDoc();
14
14
 
15
15
  const props = defineProps<{ _id: string }>();
16
16
  const after = (actionName: string, data: Branch) => {
17
- console.log("Branch capture after emits ", actionName,doc.getDocName().toLowerCase());
17
+ // console.log(
18
+ // "Branch capture after emits ",
19
+ // actionName,
20
+ // doc.getDocName().toLowerCase(),
21
+ // );
18
22
  switch (actionName) {
19
23
  case "new":
20
- goTo('organization');
24
+ goTo("organization");
21
25
  break;
22
26
  case "create":
23
- goTo('organization');
24
- refreshDocumentList('branch');
27
+ goTo("organization");
28
+ refreshDocumentList("branch");
25
29
  useNuxtApp().$event("CloseDialog", doc.getDocName().toLowerCase());
26
30
  break;
27
31
  case "update":
28
- goTo('organization');
29
- refreshDocumentList('branch');
30
- useNuxtApp().$event("CloseDialog", doc.getDocName().toLowerCase());
32
+ goTo("organization");
33
+ refreshDocumentList("branch");
34
+ useNuxtApp().$event("CloseDialog", doc.getDocName().toLowerCase());
31
35
  break;
32
36
  case "delete":
33
- goTo('organization');
34
- refreshDocumentList('branch');
37
+ goTo("organization");
38
+ refreshDocumentList("branch");
35
39
  useNuxtApp().$event("CloseDialog", doc.getDocName().toLowerCase());
36
40
  break;
37
41
  }
@@ -12,26 +12,24 @@
12
12
  import { Branch } from "~/simpleapp/generate/types";
13
13
  const doc = useNuxtApp().$BranchDoc();
14
14
 
15
-
16
15
  const after = (actionName: string, data: Branch) => {
17
- console.log("Branch capture after emits ", actionName,'branch');
16
+ // console.log("Branch capture after emits ", actionName, "branch");
18
17
  switch (actionName) {
19
18
  case "create":
20
- goTo('organization');
21
- refreshDocumentList('branch');
22
- useNuxtApp().$event("CloseDialog", 'branch');
19
+ goTo("organization");
20
+ refreshDocumentList("branch");
21
+ useNuxtApp().$event("CloseDialog", "branch");
23
22
  break;
24
23
  case "update":
25
- goTo('organization');
26
- refreshDocumentList('branch');
27
- useNuxtApp().$event("CloseDialog", 'branch');
28
-
24
+ goTo("organization");
25
+ refreshDocumentList("branch");
26
+ useNuxtApp().$event("CloseDialog", "branch");
29
27
 
30
28
  break;
31
29
  case "delete":
32
- goTo('organization');
33
- refreshDocumentList('branch');
34
- useNuxtApp().$event("CloseDialog", 'branch');
30
+ goTo("organization");
31
+ refreshDocumentList("branch");
32
+ useNuxtApp().$event("CloseDialog", "branch");
35
33
  break;
36
34
  }
37
35
  };
@@ -83,8 +83,8 @@
83
83
 
84
84
  <script setup lang="ts">
85
85
  /**
86
- * This file was automatically generated by simpleapp generator. Every
87
- * MODIFICATION OVERRIDE BY GENERATEOR
86
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
87
+ * --remove-this-line-to-prevent-override--
88
88
  * last change 2023-10-28
89
89
  * Author: Ks Tan
90
90
  */
@@ -7,7 +7,7 @@
7
7
  */
8
8
  const alltenants = ref<any[]>([])
9
9
  const totaltenant = ref(0)
10
- const list = (await getPorfileApi().getAllTenants()).data as any[];
10
+ const list = (await getProfileApi().getAllTenants()).data as any[];
11
11
  if(list.length==0 || list.length>1) navigateTo('/picktenant')
12
12
  else navigateTo (`/${list[0].permissions[0].xOrg}`)
13
13
 
@@ -123,8 +123,8 @@
123
123
  </template>
124
124
  <script setup lang="ts">
125
125
  /**
126
- * This file was automatically generated by simpleapp generator. Every
127
- * MODIFICATION OVERRIDE BY GENERATEOR
126
+ * This file was automatically generated by simpleapp generator during initialization. It is changable.
127
+ * --remove-this-line-to-prevent-override--
128
128
  * last change 2023-10-28
129
129
  * Author: Ks Tan
130
130
  */
@@ -69,6 +69,12 @@ export default defineNuxtPlugin( async(nuxtApp) => {
69
69
  console.error("unknown error")
70
70
  throw createError({statusCode:500,statusMessage:"Internal server error"})
71
71
  }
72
+ // if (error.response) {
73
+ // console.error("Backend error response:", error.response.data);
74
+ // } else {
75
+ // console.error("Network error:", error);
76
+ // }
77
+ return Promise.reject(error);
72
78
  });
73
79
  return {
74
80
  provide: {
@@ -39,7 +39,12 @@ export default defineNuxtPlugin( async(nuxtApp) => {
39
39
  branches:ref([]),
40
40
  invites : ref([]),
41
41
  time:ref(''),
42
- moreProps:ref()
42
+ moreProps:ref(),
43
+ package: ref(),
44
+ appintegration: ref({
45
+ einvoice: false,
46
+ simbiz6: false
47
+ })
43
48
  }),
44
49
 
45
50
  actions:{
@@ -52,9 +57,9 @@ export default defineNuxtPlugin( async(nuxtApp) => {
52
57
 
53
58
  let apiurl=''
54
59
  if(xorg===undefined){
55
- apiurl = `${useRuntimeConfig().public.APP_URL}/api`
60
+ apiurl = `${useRuntimeConfig().public.appUrl}/api`
56
61
  }else{
57
- apiurl = `${useRuntimeConfig().public.APP_URL}/api/${xorg}`
62
+ apiurl = `${useRuntimeConfig().public.appUrl}/api/${xorg}`
58
63
  }
59
64
 
60
65
  return await new PROFILEApi(undefined,apiurl,$axios).getProfile().then((res:AxiosResponse)=>{
@@ -85,14 +90,15 @@ export default defineNuxtPlugin( async(nuxtApp) => {
85
90
  this.time = res.data.time
86
91
  this.invites = res.data.invites
87
92
  this.moreProps = res.data.moreProps
88
-
93
+ this.package = res.data.moreProps.package;
94
+ this.appintegration.einvoice = res.data.appintegration.einvoice;
95
+ this.appintegration.simbiz6 = res.data.appintegration.simbiz6;
89
96
  let cachegroup = useCookie('currentGroup').value ?? ''
90
97
  if(!this.groups || !this.groups.includes(cachegroup)){
91
98
  cachegroup=''
92
99
  }
93
100
  this.currentGroup = cachegroup
94
101
  useNuxtApp().$event('pickGroup',cachegroup)
95
-
96
102
  return Promise.resolve(true)
97
103
  // return true
98
104
  }).catch((err:any)=>{
@@ -107,12 +113,12 @@ export default defineNuxtPlugin( async(nuxtApp) => {
107
113
  let apiurl=''
108
114
 
109
115
  if(!xorg){
110
- apiurl = `${useRuntimeConfig().public.APP_URL}/api`
116
+ apiurl = `${useRuntimeConfig().public.appUrl}/api`
111
117
  }else{
112
118
  try{
113
119
  const xorgdecode = atob(<string>xorg)
114
120
  if(xorgdecode.includes('-')){
115
- apiurl = `${useRuntimeConfig().public.APP_URL}/api/${xorg}`
121
+ apiurl = `${useRuntimeConfig().public.appUrl}/api/${xorg}`
116
122
  }else{
117
123
  return Promise.reject('wrongxorg')
118
124
  }
@@ -135,7 +141,7 @@ export default defineNuxtPlugin( async(nuxtApp) => {
135
141
 
136
142
  },
137
143
  async decideInvitation(id:string,decision:string){
138
- const apiurl = `${useRuntimeConfig().public.APP_URL}/api`
144
+ const apiurl = `${useRuntimeConfig().public.appUrl}/api`
139
145
  const {$axios} = useNuxtApp()
140
146
  // console.log("decideInvitation",id,decision)
141
147
  const result = await new PROFILEApi(undefined,apiurl,$axios).decideInvitation(id,decision)
@@ -155,11 +161,70 @@ export default defineNuxtPlugin( async(nuxtApp) => {
155
161
  this.roles.includes('superuser')
156
162
  ){
157
163
  return true
158
- }else{
164
+ }else if( resourcename == 'Paymentverify'){
165
+ if (
166
+ this.roles.includes('admin') ||
167
+ this.roles.includes('manager')
168
+ ){
169
+ return true;
170
+ }
171
+ }
172
+ else if( resourcename == 'Reminder'){
173
+ if (
174
+ this.roles.includes('admin') ||
175
+ this.roles.includes('manager')
176
+ ){
177
+ return true;
178
+ }
179
+ }
180
+ else if( resourcename == 'Generateinvoice'){
181
+ if (
182
+ this.roles.includes('admin') ||
183
+ this.roles.includes('manager') ||
184
+ this.roles.includes('executive')
185
+ ){
186
+ return true;
187
+ }
188
+ }
189
+ else if( resourcename == 'Upgradelevel'){
190
+ if (
191
+ this.roles.includes('admin') ||
192
+ this.roles.includes('manager') ||
193
+ this.roles.includes('executive')
194
+ ){
195
+ return true;
196
+ }
197
+ }
198
+ else if( resourcename == 'Appintegration'){
199
+ if (
200
+ this.roles.includes('admin') ||
201
+ this.roles.includes('manager')
202
+ ){
203
+ return true;
204
+ }
205
+ }
206
+ else if( resourcename == 'Postingtosimbiz'){
207
+ if (
208
+ this.roles.includes('admin')
209
+ ){
210
+ return true;
211
+ }
212
+ }
213
+ else if( resourcename == 'Studentdescription'){
214
+ if (
215
+ this.roles.includes('admin') ||
216
+ this.roles.includes('manager') ||
217
+ this.roles.includes('executive')
218
+ ){
219
+ return true;
220
+ }
221
+ }
222
+ else{
159
223
  const checkstr= `${resourcename}:${action}`
160
224
  // console.log("verify",checkstr)
161
225
  return this.roles.includes(checkstr)
162
226
  }
227
+ return false;
163
228
  },
164
229
  haveAccess(resourcename:string){
165
230
  //super admin always full access right
@@ -172,6 +237,14 @@ export default defineNuxtPlugin( async(nuxtApp) => {
172
237
  ){
173
238
  return true
174
239
  }
240
+ else if( resourcename == 'Paymentverify'){
241
+ if (
242
+ this.roles.includes('admin') ||
243
+ this.roles.includes('manager')
244
+ ){
245
+ return true;
246
+ }
247
+ }
175
248
  for(let i=0; i< this.roles.length; i++){
176
249
  const role:string = this.roles[i]
177
250
  if(role.includes(resourcename)){
@@ -216,11 +289,15 @@ export default defineNuxtPlugin( async(nuxtApp) => {
216
289
  groups:this.groups,
217
290
  currentGroup:this.currentGroup,
218
291
  time:this.time,
219
- moreProps: this.moreProps
220
-
292
+ moreProps: this.moreProps,
293
+ package: this.package,
294
+ appintegration: this.appintegration
221
295
  }
222
296
  return userinfo
223
- }
297
+ },
298
+ isExecutive() {
299
+ return this.currentGroup == 'executive';
300
+ },
224
301
  }
225
302
  })
226
303
 
@@ -7,12 +7,15 @@
7
7
  import { defineNuxtPlugin } from "#app";
8
8
  import Pusher from 'pusher-js';
9
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 {
10
+ const pusherkey = (useRuntimeConfig().app.pusherKey ?? '') as string
11
+ const pushercluster = (useRuntimeConfig().app.pusherCluster ?? '') as string
12
+ let pusher: Pusher | null = null;
13
+ if (pusherkey && pushercluster) {
14
+ pusher = new Pusher(pusherkey, { cluster: pushercluster,});
15
+ }
16
+ return {
14
17
  provide: {
15
- pusher:pusher
18
+ pusher: pusher
16
19
  }
17
20
  }
18
21
  });