@simitgroup/simpleapp-generator 1.4.1-alpha → 1.5.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.
- package/dist/buildinschemas/autoincreament.d.ts.map +1 -1
- package/dist/buildinschemas/autoincreament.js +1 -0
- package/dist/buildinschemas/autoincreament.js.map +1 -1
- package/dist/buildinschemas/docnoformat.d.ts.map +1 -1
- package/dist/buildinschemas/docnoformat.js +1 -0
- package/dist/buildinschemas/docnoformat.js.map +1 -1
- package/dist/buildinschemas/permission.d.ts.map +1 -1
- package/dist/buildinschemas/permission.js +1 -8
- package/dist/buildinschemas/permission.js.map +1 -1
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +4 -2
- package/dist/framework.js.map +1 -1
- package/dist/generate.js +8 -10
- package/dist/generate.js.map +1 -1
- package/dist/processors/bpmnbuilder.d.ts.map +1 -1
- package/dist/processors/bpmnbuilder.js +10 -4
- package/dist/processors/bpmnbuilder.js.map +1 -1
- package/dist/processors/jsonschemabuilder.d.ts.map +1 -1
- package/dist/processors/jsonschemabuilder.js +9 -0
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/package.json +1 -1
- package/src/buildinschemas/autoincreament.ts +1 -0
- package/src/buildinschemas/docnoformat.ts +1 -0
- package/src/buildinschemas/permission.ts +1 -8
- package/src/framework.ts +5 -4
- package/src/generate.ts +11 -11
- package/src/processors/bpmnbuilder.ts +10 -5
- package/src/processors/jsonschemabuilder.ts +10 -0
- package/templates/basic/nest/apischema.ts.eta +5 -0
- package/templates/basic/nest/controller.ts.eta +28 -10
- package/templates/basic/nest/resolver.ts.eta +124 -0
- package/templates/basic/nest/service.ts.eta +0 -6
- package/templates/basic/nuxt/pages.landing.vue.eta +4 -2
- package/templates/basic/nuxt/pages.mobile.landing.vue.eta +3 -3
- package/templates/nest/.env._eta +7 -7
- package/templates/nest/src/app.module.ts.eta +22 -21
- package/templates/nest/src/app.resolver.ts.eta +9 -0
- package/templates/nest/src/simpleapp/generate/commons/decorators/appuser.decorator.ts.eta +11 -5
- package/templates/nest/src/simpleapp/generate/commons/interceptors/response.interceptor.ts.eta +44 -39
- package/templates/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +16 -4
- package/templates/nest/src/simpleapp/generate/commons/roles/roles.guard.ts.eta +24 -12
- package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +26 -18
- package/templates/nest/src/simpleapp/generate/types/index.ts.eta +1 -0
- package/templates/nest/src/simpleapp/generate/types/workflow.type.ts.eta +15 -0
- package/templates/nest/src/simpleapp/generate/workflow/workflow.config.ts.eta +2 -2
- package/templates/nest/src/simpleapp/generate/workflow/workflow.controller.ts.eta +8 -6
- package/templates/nest/src/simpleapp/generate/workflow/workflow.service.ts.eta +41 -22
- package/templates/nest/src/simpleapp/resolvers/readme.md.eta +1 -0
- package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +9 -2
- package/templates/nuxt/app.vue._eta +9 -2
- package/templates/nuxt/components/calendar/CalendarByResource.vue.eta +1 -1
- package/templates/nuxt/components/mobile/MobileToolbar.vue.eta +11 -11
- package/templates/nuxt/components/overlay/OverlayHoldscreen.vue._eta +26 -0
- package/templates/nuxt/components/renderer/RendererDate.vue.eta +1 -1
- package/templates/nuxt/components/renderer/RendererDateTime.vue.eta +1 -1
- package/templates/nuxt/components/renderer/RendererForeignKey.vue.eta +7 -7
- package/templates/nuxt/components/renderer/RendererMoney.vue.eta +21 -12
- package/templates/nuxt/components/renderer/RendererTime.vue.eta +13 -0
- package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +11 -10
- package/templates/nuxt/composables/date.generate.ts.eta +10 -3
- package/templates/nuxt/composables/getDocument.generate.ts.eta +4 -4
- package/templates/nuxt/composables/graphquery.generate.ts.eta +26 -0
- package/templates/nuxt/composables/holdscreen.generate.ts.eta +9 -0
- package/templates/nuxt/composables/refreshDocumentList.generate.ts.eta +7 -6
- package/templates/nuxt/layouts/mobile.vue._eta +3 -3
- package/templates/nuxt/nuxt.config.ts._eta +8 -0
- package/templates/nuxt/pages/[xorg]/index.vue._eta +9 -0
- package/templates/nuxt/pages/[xorg]/mobile/index.vue._eta +2 -15
- package/templates/nuxt/pages/picktenant.vue._eta +3 -1
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +17 -3
- package/templates/nuxt/types/calendar.ts.eta +8 -3
- package/templates/nuxt/types/documentlist.ts.eta +13 -1
- package/templates/nuxt/types/events.ts.eta +5 -3
- package/templates/nuxt/types/others.ts.eta +3 -5
- package/templates/project/workflows/bpmn/{suspendcustomer.bpmn._eta → sayhello.bpmn._eta} +6 -36
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span v-if="modelValue">{{ toUTCTime(modelValue) }}</span>
|
|
3
|
+
<span v-else>-</span>
|
|
4
|
+
</template>
|
|
5
|
+
<script lang="ts" setup>
|
|
6
|
+
/**
|
|
7
|
+
* This file was automatically generated by simpleapp generator during initialization.
|
|
8
|
+
* DONT CHANGE THIS FILE CAUSE IT OVERRIDE
|
|
9
|
+
* last change 2024-04-14
|
|
10
|
+
* author: Ks Tan
|
|
11
|
+
*/
|
|
12
|
+
const modelValue = defineModel<Date | string>();
|
|
13
|
+
</script>
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
:readonly="isReadonly"
|
|
96
96
|
:placeholder="placeholder"
|
|
97
97
|
:date-format="getDateFormat()"
|
|
98
|
-
showTime
|
|
98
|
+
showTime
|
|
99
99
|
hourFormat="12"
|
|
100
100
|
v-bind="componentProps as CalendarProps"
|
|
101
101
|
/>
|
|
@@ -229,17 +229,19 @@
|
|
|
229
229
|
<InputNumber
|
|
230
230
|
v-else-if="inputType == SimpleAppInputType.number"
|
|
231
231
|
:type="type"
|
|
232
|
-
v-model="modelValue
|
|
232
|
+
v-model="modelValue"
|
|
233
233
|
@focus="setFocus"
|
|
234
234
|
:readonly="isReadonly"
|
|
235
235
|
:pt="pt"
|
|
236
236
|
:class="!pt ? 'w-full flex flex-col' : ''"
|
|
237
237
|
:inputId="slotprops.uuid"
|
|
238
238
|
@update:modelValue="onChange"
|
|
239
|
+
|
|
239
240
|
:path="setting.instancepath"
|
|
240
241
|
v-bind="componentProps as InputNumber"
|
|
241
242
|
:placeholder="placeholder"
|
|
242
243
|
/>
|
|
244
|
+
<!-- // // -->
|
|
243
245
|
<InputNumber
|
|
244
246
|
v-else-if="inputType == SimpleAppInputType.money"
|
|
245
247
|
:type="type"
|
|
@@ -252,7 +254,7 @@
|
|
|
252
254
|
:class="!pt ? 'w-full flex flex-col' : ''"
|
|
253
255
|
:inputId="slotprops.uuid"
|
|
254
256
|
:path="setting.instancepath"
|
|
255
|
-
@
|
|
257
|
+
@update:modelValue="onChange"
|
|
256
258
|
v-bind="componentProps as InputNumber"
|
|
257
259
|
:placeholder="placeholder"
|
|
258
260
|
/>
|
|
@@ -359,7 +361,7 @@ if (props.inputType == SimpleAppInputType.date && modelValue.value) {
|
|
|
359
361
|
datevalue.value = undefined;
|
|
360
362
|
}
|
|
361
363
|
if (props.inputType == SimpleAppInputType.datetime && modelValue.value) {
|
|
362
|
-
datetimevalue.value = stringToDate(<string>modelValue.value);
|
|
364
|
+
datetimevalue.value = stringToDate(<string>modelValue.value);
|
|
363
365
|
} else {
|
|
364
366
|
datetimevalue.value = undefined;
|
|
365
367
|
}
|
|
@@ -427,14 +429,14 @@ const updateDate = (value: any) => {
|
|
|
427
429
|
}
|
|
428
430
|
onChange();
|
|
429
431
|
};
|
|
430
|
-
const updateDateTime = (value:any)=>{
|
|
432
|
+
const updateDateTime = (value: any) => {
|
|
431
433
|
if (value) {
|
|
432
434
|
modelValue.value = dateToISOString(value);
|
|
433
435
|
} else {
|
|
434
436
|
modelValue.value = "";
|
|
435
437
|
}
|
|
436
438
|
onChange();
|
|
437
|
-
}
|
|
439
|
+
};
|
|
438
440
|
|
|
439
441
|
const setFocus = (ev: any) => {
|
|
440
442
|
if (!isMobile()) ev.target.select();
|
|
@@ -476,15 +478,13 @@ watch(modelValue, (newvalue: any) => {
|
|
|
476
478
|
} else {
|
|
477
479
|
timevalue.value = undefined;
|
|
478
480
|
}
|
|
479
|
-
|
|
480
481
|
} else if (props.inputType == SimpleAppInputType.datetime) {
|
|
481
482
|
if (modelValue.value) {
|
|
482
483
|
datetimevalue.value = stringToDate(modelValue.value as string);
|
|
483
484
|
} else {
|
|
484
485
|
timevalue.value = undefined;
|
|
485
486
|
}
|
|
486
|
-
}
|
|
487
|
-
else if (props.inputType == SimpleAppInputType.time) {
|
|
487
|
+
} else if (props.inputType == SimpleAppInputType.time) {
|
|
488
488
|
if (modelValue.value) {
|
|
489
489
|
timevalue.value = stringToDate(
|
|
490
490
|
(today() + "T" + modelValue.value) as string,
|
|
@@ -505,7 +505,7 @@ onMounted(() => {
|
|
|
505
505
|
} else {
|
|
506
506
|
datevalue.value = undefined;
|
|
507
507
|
}
|
|
508
|
-
} else
|
|
508
|
+
} else if (props.inputType == SimpleAppInputType.datetime) {
|
|
509
509
|
if (modelValue.value) {
|
|
510
510
|
datetimevalue.value = stringToDate(modelValue.value as string);
|
|
511
511
|
} else {
|
|
@@ -523,6 +523,7 @@ onMounted(() => {
|
|
|
523
523
|
});
|
|
524
524
|
|
|
525
525
|
const onChange = () => {
|
|
526
|
+
console.log("On change ", props.inputType)
|
|
526
527
|
pt.value = undefined;
|
|
527
528
|
resetcount.value++;
|
|
528
529
|
emits("change", modelValue.value);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was automatically generated by simpleapp generator. Every
|
|
3
3
|
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-
|
|
4
|
+
* last change 2024-04-13
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
|
+
import { DurationType } from "~/types"
|
|
8
|
+
|
|
7
9
|
export const setDateLocale = (localename:string) => useDayjs().locale(localename)
|
|
8
10
|
export const dateExists = (date:Date,listDate:Date[]) => {
|
|
9
11
|
const existsrecord = listDate.find(item=>{
|
|
@@ -18,11 +20,16 @@ export const dateToString = (date:Date) => useDayjs()(date).format('YYYY-MM-DD')
|
|
|
18
20
|
export const dateToISOString = (date:Date) => useDayjs()(date).toISOString()
|
|
19
21
|
export const dateToTimeString = (date:Date) => useDayjs()(date).format('HH:mm:ss')
|
|
20
22
|
export const stringToDate = (datestr:string) => new Date(datestr)
|
|
21
|
-
export const dateToDateTimeString = (date:Date)=> useDayjs()(date).format('YYYY-MM-DD HH:mm:ss')
|
|
22
|
-
export const
|
|
23
|
+
export const dateToDateTimeString = (date:Date)=> useDayjs().utc(date).format('YYYY-MM-DD HH:mm:ss')
|
|
24
|
+
export const toUTCDate = (date:string | Date)=> useDayjs().utc(date).format(getDateFormat())
|
|
25
|
+
export const toUTCDateTime = (date:string | Date)=> useDayjs().utc(date).format(getDateTimeFormat())
|
|
26
|
+
export const toUTCTime = (date:string | Date)=> useDayjs().utc(date).format('HH:mm')
|
|
23
27
|
export const getDateFormat = ():string=> 'DD-MM-YYYY'
|
|
28
|
+
export const getDateTimeFormat = ():string=> 'DD-MM-YYYY HH:mm'
|
|
24
29
|
export const calculateHourDifferent = (date1:Date, date2:Date) => (date1.getTime() - date2.getTime())/60/60/1000
|
|
25
30
|
export const getPrimevueCalendarDateFormat = () => {
|
|
26
31
|
const country = <string>getUserProfile()?.country
|
|
27
32
|
return 'dd/mm/yy'
|
|
28
33
|
}
|
|
34
|
+
export const getDayNameInWeek = (date:Date|string) => useDayjs()(date).format('ddd').toLowerCase();
|
|
35
|
+
export const addTime = (date:Date|string,duration:number,unit:DurationType) => getDayJs()(date).add(duration, 'hour').toDate()
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
7
|
import {getAllDocuments} from '~/simpleapp/generate/commons/documents'
|
|
8
|
-
import { FormCrudEvent } from '~/types'
|
|
9
|
-
export const getDocument = (docname:
|
|
8
|
+
import { FormCrudEvent,SimpleAppDocumentType } from '~/types'
|
|
9
|
+
export const getDocument = (docname:SimpleAppDocumentType) =>{
|
|
10
10
|
return getAllDocuments().find((item)=>item.docName==docname) //?.docClass
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// (appuser: UserContext, filter: any) => Promise<void>;
|
|
14
|
-
export const onScreenAddDocument = <T>(docname:
|
|
14
|
+
export const onScreenAddDocument = <T>(docname:SimpleAppDocumentType,paras?:T,after?:(eventType:FormCrudEvent, data:T)=>Promise<void>)=>{
|
|
15
15
|
useNuxtApp().$event('ViewRecord',{
|
|
16
16
|
documentName: docname,
|
|
17
17
|
eventId:randomUUID(),
|
|
@@ -27,7 +27,7 @@ export const onScreenAddDocument = <T>(docname:string,paras?:T,after?:(eventType
|
|
|
27
27
|
|
|
28
28
|
})
|
|
29
29
|
}
|
|
30
|
-
export const onScreenEditDocument = <T>(docname:
|
|
30
|
+
export const onScreenEditDocument = <T>(docname:SimpleAppDocumentType,_id:string,after?:(eventType:FormCrudEvent, data:T)=>Promise<void>)=>{
|
|
31
31
|
useNuxtApp().$event('ViewRecord',{
|
|
32
32
|
documentName: docname,
|
|
33
33
|
eventId:randomUUID(),
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
+
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
+
* last change 2024-03-13
|
|
5
|
+
* Author: Ks Tan
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { createHttpLink, } from '@apollo/client/core';
|
|
9
|
+
|
|
10
|
+
export const setGraphqlServer=()=>{
|
|
11
|
+
const apolloclient = useNuxtApp().$apollo.defaultClient
|
|
12
|
+
const newlink = createHttpLink({
|
|
13
|
+
uri: `${useRuntimeConfig().public.API_URL}/${getCurrentXorg()}/graphql`,
|
|
14
|
+
})
|
|
15
|
+
apolloclient.setLink(newlink)
|
|
16
|
+
// apolloclient.defaultOptions={
|
|
17
|
+
|
|
18
|
+
// query:{
|
|
19
|
+
// fetchPolicy: 'no-cache',
|
|
20
|
+
// errorPolicy: 'all'
|
|
21
|
+
// }
|
|
22
|
+
// }
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const graphquery=async(qqlstr: typeof gql) =>(await useAsyncQuery(qqlstr)).data
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
+
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
+
* last change 2024-03-13
|
|
5
|
+
* Author: Ks Tan
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const holdScreenStart=()=> useNuxtApp().$event('HoldScreen',true)
|
|
9
|
+
export const holdScreenEnd=()=> useNuxtApp().$event('HoldScreen',false)
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was automatically generated by simpleapp generator. Every
|
|
3
3
|
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-
|
|
4
|
+
* last change 2024-04-15
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
export const
|
|
7
|
+
import {SimpleAppDocumentType} from '~/types'
|
|
8
|
+
export const refreshDocumentList = (docName:SimpleAppDocumentType)=>useNuxtApp().$event('RefreshDocumentList',{documentName:docName})
|
|
9
|
+
export const refreshDocument = (docName:SimpleAppDocumentType)=>useNuxtApp().$event('RefreshDocument',docName)
|
|
9
10
|
|
|
10
|
-
export const listenDocument = (docName:
|
|
11
|
+
export const listenDocument = (docName:SimpleAppDocumentType,callback:Function) =>{
|
|
11
12
|
useNuxtApp().$listen('RefreshDocument',async (eventdocname:string)=>{
|
|
12
13
|
if(eventdocname==docName) await callback()
|
|
13
14
|
})
|
|
14
15
|
}
|
|
15
|
-
export const listenDocumentList = (docName:
|
|
16
|
+
export const listenDocumentList = (docName:SimpleAppDocumentType,callback:Function) =>{
|
|
16
17
|
useNuxtApp().$listen('RefreshDocumentList',async (eventdata)=>{
|
|
17
18
|
if(eventdata.documentName == docName) await callback()
|
|
18
19
|
})
|
|
19
|
-
}
|
|
20
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="h-screen flex flex-col">
|
|
3
3
|
|
|
4
4
|
<div class="flex flex-col grow overflow-y-auto">
|
|
5
|
-
<div class="flex flex-
|
|
5
|
+
<div class="flex flex-col mb-14 w-full">
|
|
6
6
|
<slot></slot>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
<HeaderButtonMenuPicker v-model="showMenu"></HeaderButtonMenuPicker>
|
|
25
25
|
<HeaderButtonProfile v-model="showProfile"/>
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
</div>
|
|
28
|
-
|
|
28
|
+
<UserInvitation/>
|
|
29
29
|
<!-- <HeaderBar class="border flex flex-row h-10 fixed left-0 w-full justify justify-between top-0 z-50 bg-white dark:bg-gray-800"/> -->
|
|
30
30
|
|
|
31
31
|
</div>
|
|
@@ -50,6 +50,7 @@ devServer: {
|
|
|
50
50
|
'dayjs-nuxt',
|
|
51
51
|
'@sidebase/nuxt-auth',
|
|
52
52
|
'nuxt-primevue',
|
|
53
|
+
'@nuxtjs/apollo',
|
|
53
54
|
// '@nuxtjs/pwa', //cannot turn on, will cause nuxt cant start
|
|
54
55
|
// "nuxt-security", //temporary avoid nuxt-security cause cors
|
|
55
56
|
'@vueuse/nuxt',
|
|
@@ -89,6 +90,13 @@ devServer: {
|
|
|
89
90
|
],
|
|
90
91
|
defaultLocale: "en",
|
|
91
92
|
},
|
|
93
|
+
apollo: {
|
|
94
|
+
clients: {
|
|
95
|
+
default: {
|
|
96
|
+
httpEndpoint: process.env.API_URL
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
},
|
|
92
100
|
primevue: {
|
|
93
101
|
|
|
94
102
|
options: {
|
|
@@ -16,4 +16,13 @@
|
|
|
16
16
|
* author: Ks Tan
|
|
17
17
|
*/
|
|
18
18
|
useNuxtApp().$event('SetTitle',t('home'))
|
|
19
|
+
|
|
20
|
+
onMounted(()=>{
|
|
21
|
+
if(!getUserStore()?.currency || !getUserStore()?.country){
|
|
22
|
+
const id=getUserStore().orgRecordId
|
|
23
|
+
onScreenEditDocument<Organization>('organization',id, async (actionName:FormCrudEvent,data:Organization)=>{
|
|
24
|
+
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
})
|
|
19
28
|
</script>
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<client-only>
|
|
4
|
-
<title>{{ getUserProfile()?.branchName }}</title>
|
|
5
|
-
</client-only>
|
|
6
|
-
<h1 class="border text-3xl text-center m-20 p-20">
|
|
7
|
-
{{ t("createYourContentHere") }}
|
|
8
|
-
</h1>
|
|
9
|
-
</div>
|
|
2
|
+
<IndexPage></IndexPage>
|
|
10
3
|
</template>
|
|
11
4
|
<script lang="ts" setup>
|
|
12
|
-
|
|
13
|
-
* This file was automatically generated by simpleapp generator during initialization. It is changable.
|
|
14
|
-
* --remove-this-line-to-prevent-override--
|
|
15
|
-
* last change 2024-02-22
|
|
16
|
-
* author: Ks Tan
|
|
17
|
-
*/
|
|
18
|
-
useNuxtApp().$event('SetTitle',t('home'))
|
|
5
|
+
import IndexPage from '../index.vue'
|
|
19
6
|
</script>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<div class="flex flex-col w-full">
|
|
3
3
|
<TextTitle class="text-center p-2">{{ t("pickYourDatabase") }}</TextTitle>
|
|
4
4
|
<div class="flex flex-col">
|
|
5
|
+
|
|
5
6
|
<div class="p-4">
|
|
7
|
+
{{ t('welcome ') }} {{ getUserProfile()?.fullName }}
|
|
6
8
|
<UserButtonCreateTenant></UserButtonCreateTenant>
|
|
7
9
|
</div>
|
|
8
10
|
<UserTenantPicker></UserTenantPicker>
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
/**
|
|
14
16
|
* This file was automatically generated by simpleapp generator.
|
|
15
17
|
* --remove-this-line-to-prevent-override--
|
|
16
|
-
* last change 2023-
|
|
18
|
+
* last change 2023-04-17
|
|
17
19
|
* author: Ks Tan
|
|
18
20
|
*/
|
|
19
21
|
</script>
|
|
@@ -68,6 +68,7 @@ export class SimpleAppClient<
|
|
|
68
68
|
return await this.docapi.runFindOne(id,this.axios)
|
|
69
69
|
.then((res: AxiosResponse) => {
|
|
70
70
|
// if(this.event){this.event('info:getById',res.data)}
|
|
71
|
+
this.data.value={} as TData
|
|
71
72
|
Object.assign(this.data.value, res.data);
|
|
72
73
|
return res;
|
|
73
74
|
}).catch((res:any)=>{
|
|
@@ -76,7 +77,7 @@ export class SimpleAppClient<
|
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
async create() {
|
|
80
|
+
async create() {
|
|
80
81
|
const errors = this.validateFailed();
|
|
81
82
|
const {$event} =useNuxtApp()
|
|
82
83
|
if (errors) {
|
|
@@ -85,10 +86,11 @@ export class SimpleAppClient<
|
|
|
85
86
|
summary:'Record create failed',
|
|
86
87
|
status:NotificationStatus.error,
|
|
87
88
|
data:errors
|
|
88
|
-
})
|
|
89
|
+
})
|
|
89
90
|
// this.event('error:create',errors)
|
|
90
91
|
return await Promise.reject(errors);
|
|
91
92
|
} else {
|
|
93
|
+
holdScreenStart()
|
|
92
94
|
return await this.docapi
|
|
93
95
|
.runCreate(this.data.value,this.axios)
|
|
94
96
|
.then((res: AxiosResponse) => {
|
|
@@ -99,7 +101,9 @@ export class SimpleAppClient<
|
|
|
99
101
|
// summary:'Record create successfully',
|
|
100
102
|
// status:NotificationStatus.success
|
|
101
103
|
// })
|
|
104
|
+
this.data.value = {} as TData
|
|
102
105
|
this.data.value = { ...res.data };
|
|
106
|
+
holdScreenEnd()
|
|
103
107
|
return res.data;
|
|
104
108
|
}).catch((errors:any)=>{
|
|
105
109
|
$event('Notification',{
|
|
@@ -109,6 +113,7 @@ export class SimpleAppClient<
|
|
|
109
113
|
data:errors.response.data
|
|
110
114
|
})
|
|
111
115
|
console.error('error:create',errors.response.data)
|
|
116
|
+
holdScreenEnd()
|
|
112
117
|
return Promise.reject(errors)
|
|
113
118
|
});
|
|
114
119
|
}
|
|
@@ -129,6 +134,7 @@ export class SimpleAppClient<
|
|
|
129
134
|
console.error('update errors',errors)
|
|
130
135
|
return await Promise.reject(errors);
|
|
131
136
|
} else {
|
|
137
|
+
holdScreenStart()
|
|
132
138
|
return await this.docapi
|
|
133
139
|
.runUpdate(recordid, this.data.value,this.axios)
|
|
134
140
|
.then((res: AxiosResponse) => {
|
|
@@ -139,7 +145,8 @@ export class SimpleAppClient<
|
|
|
139
145
|
// status:NotificationStatus.success,
|
|
140
146
|
// data:errors
|
|
141
147
|
// })
|
|
142
|
-
this.data.value = res.data
|
|
148
|
+
this.data.value = res.data
|
|
149
|
+
holdScreenEnd()
|
|
143
150
|
return res.data;
|
|
144
151
|
}).catch((errors:any)=>{
|
|
145
152
|
$event('Notification',{
|
|
@@ -152,6 +159,7 @@ export class SimpleAppClient<
|
|
|
152
159
|
// if(this.event){
|
|
153
160
|
// this.event('error:update',errors.response.data.data)}
|
|
154
161
|
console.error('error:update',errors.response.data)
|
|
162
|
+
holdScreenEnd()
|
|
155
163
|
return Promise.reject(errors)
|
|
156
164
|
});
|
|
157
165
|
}
|
|
@@ -160,6 +168,7 @@ export class SimpleAppClient<
|
|
|
160
168
|
async patch() {
|
|
161
169
|
const {$event} =useNuxtApp()
|
|
162
170
|
const recordid: string = this.data.value._id ?? '';
|
|
171
|
+
holdScreenStart()
|
|
163
172
|
return await this.docapi
|
|
164
173
|
.runPatch(recordid, this.data.value,this.axios)
|
|
165
174
|
.then((res: AxiosResponse) => {
|
|
@@ -171,6 +180,7 @@ export class SimpleAppClient<
|
|
|
171
180
|
// data:errors
|
|
172
181
|
// })
|
|
173
182
|
this.data.value = res.data
|
|
183
|
+
holdScreenEnd()
|
|
174
184
|
return res.data;
|
|
175
185
|
}).catch((errors:any)=>{
|
|
176
186
|
$event('Notification',{
|
|
@@ -183,6 +193,7 @@ export class SimpleAppClient<
|
|
|
183
193
|
// if(this.event){
|
|
184
194
|
// this.event('error:update',errors.response.data.data)}
|
|
185
195
|
console.error('error:patch',errors.response.data)
|
|
196
|
+
holdScreenEnd()
|
|
186
197
|
return Promise.reject(errors)
|
|
187
198
|
|
|
188
199
|
})
|
|
@@ -192,6 +203,7 @@ export class SimpleAppClient<
|
|
|
192
203
|
id = this.data.value._id ?? ''
|
|
193
204
|
}
|
|
194
205
|
const {$event} =useNuxtApp()
|
|
206
|
+
holdScreenStart()
|
|
195
207
|
return await this.docapi.runDelete(id,this.axios)
|
|
196
208
|
.then((res:AxiosResponse)=>{
|
|
197
209
|
// if(this.event){this.event('success:delete',res.data)}
|
|
@@ -201,6 +213,7 @@ export class SimpleAppClient<
|
|
|
201
213
|
// status:NotificationStatus.success,
|
|
202
214
|
// data:res.data
|
|
203
215
|
// })
|
|
216
|
+
holdScreenEnd()
|
|
204
217
|
return Promise.resolve(res.data)
|
|
205
218
|
}).catch((errors:any)=>{
|
|
206
219
|
// if(this.event){this.event('error:delete',errors.response.data.data)}
|
|
@@ -211,6 +224,7 @@ export class SimpleAppClient<
|
|
|
211
224
|
data:errors.response.data
|
|
212
225
|
})
|
|
213
226
|
console.error(errors.response.data)
|
|
227
|
+
holdScreenEnd()
|
|
214
228
|
return Promise.reject(errors)
|
|
215
229
|
});
|
|
216
230
|
}
|
|
@@ -4,13 +4,18 @@
|
|
|
4
4
|
* last change 2024-02-23
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
|
-
import { ForeignKey } from "./others"
|
|
8
|
-
export type OffDay={
|
|
7
|
+
import { ForeignKey } from "./others"
|
|
8
|
+
export type OffDay={
|
|
9
9
|
_id:string
|
|
10
10
|
date:Date
|
|
11
11
|
title:string
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
export type DurationType = keyof {
|
|
14
|
+
'hour':'hour',
|
|
15
|
+
'month':'month',
|
|
16
|
+
'day':'day',
|
|
17
|
+
'minute':'minute'
|
|
18
|
+
}
|
|
14
19
|
export type CalRightClickEvent = {
|
|
15
20
|
class: string //"vuecal__cell--day5"
|
|
16
21
|
content: number //16
|
|
@@ -3,4 +3,16 @@
|
|
|
3
3
|
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
4
|
* last change 2024-02-23
|
|
5
5
|
* Author: Ks Tan
|
|
6
|
-
*/
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export type SimpleAppDocuments = {
|
|
10
|
+
<%for(let i=0; i<it.modules.length;i++){ %>
|
|
11
|
+
<% const d = it.modules[i] %>
|
|
12
|
+
<%= d['docname'].toLowerCase() %>:any,
|
|
13
|
+
<%}%>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type SimpleAppDocumentType = keyof SimpleAppDocuments
|
|
17
|
+
|
|
18
|
+
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was automatically generated by simpleapp generator. Every
|
|
3
3
|
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-
|
|
4
|
+
* last change 2024-04-15
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
7
|
import { Component } from 'vue';
|
|
8
8
|
import {Notification} from './notifications'
|
|
9
9
|
import { SimpleAppClient } from '~/simpleapp/generate/clients/SimpleAppClient';
|
|
10
10
|
import { FormCrudEvent } from './simpleappinput';
|
|
11
|
+
import { SimpleAppDocumentType } from './documentlist';
|
|
11
12
|
export type ViewRecord = {
|
|
12
13
|
_id: string
|
|
13
14
|
eventId:string
|
|
14
15
|
label:string
|
|
15
|
-
documentName:
|
|
16
|
+
documentName: SimpleAppDocumentType
|
|
16
17
|
viewer?: any
|
|
17
18
|
readonly?:boolean
|
|
18
19
|
paras?:any
|
|
@@ -20,7 +21,7 @@ export type ViewRecord = {
|
|
|
20
21
|
document?:SimpleAppClient<any,any>
|
|
21
22
|
}
|
|
22
23
|
export type RefreshDocumentList ={
|
|
23
|
-
documentName :
|
|
24
|
+
documentName : SimpleAppDocumentType,
|
|
24
25
|
data?:any
|
|
25
26
|
}
|
|
26
27
|
export type EventType ={
|
|
@@ -36,4 +37,5 @@ export type EventType ={
|
|
|
36
37
|
'SessionExpire': string
|
|
37
38
|
'CloseDialog': string
|
|
38
39
|
'pickGroup':string
|
|
40
|
+
'HoldScreen':boolean
|
|
39
41
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was automatically generated by simpleapp generator. Every
|
|
3
3
|
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-
|
|
4
|
+
* last change 2024-04-14
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
7
|
import {SimpleAppClient} from '~/simpleapp/generate/clients/SimpleAppClient'
|
|
8
|
-
import {
|
|
9
|
-
import { Component } from 'vue'
|
|
10
|
-
|
|
8
|
+
import { SimpleAppDocumentType } from './documentlist';
|
|
11
9
|
export type ForeignKey = {
|
|
12
10
|
_id: string;
|
|
13
11
|
label: string;
|
|
@@ -44,7 +42,7 @@ import { Component } from 'vue'
|
|
|
44
42
|
|
|
45
43
|
|
|
46
44
|
export type RendererSetting ={
|
|
47
|
-
documentName:
|
|
45
|
+
documentName:SimpleAppDocumentType,
|
|
48
46
|
[key:string]:any
|
|
49
47
|
}
|
|
50
48
|
export type SearchBody = {
|
|
@@ -1,55 +1,33 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
|
|
2
|
+
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
|
|
3
3
|
<bpmn:process id="process1" name="Suspend Customer" isExecutable="false">
|
|
4
4
|
<bpmn:extensionElements />
|
|
5
5
|
<bpmn:startEvent id="StartEvent_1">
|
|
6
6
|
<bpmn:outgoing>Flow_1a63g0z</bpmn:outgoing>
|
|
7
7
|
</bpmn:startEvent>
|
|
8
8
|
<bpmn:endEvent id="Event_0qpgd23">
|
|
9
|
-
<bpmn:incoming>
|
|
9
|
+
<bpmn:incoming>Flow_1rspxq4</bpmn:incoming>
|
|
10
10
|
</bpmn:endEvent>
|
|
11
11
|
<bpmn:sequenceFlow id="Flow_1a63g0z" sourceRef="StartEvent_1" targetRef="hello1" />
|
|
12
|
-
<bpmn:sequenceFlow id="Flow_1rspxq4" sourceRef="hello1" targetRef="
|
|
12
|
+
<bpmn:sequenceFlow id="Flow_1rspxq4" sourceRef="hello1" targetRef="Event_0qpgd23" />
|
|
13
13
|
<bpmn:serviceTask id="hello1" name="hello1">
|
|
14
14
|
<bpmn:documentation>hello1 doc
|
|
15
15
|
bbb</bpmn:documentation>
|
|
16
16
|
<bpmn:incoming>Flow_1a63g0z</bpmn:incoming>
|
|
17
17
|
<bpmn:outgoing>Flow_1rspxq4</bpmn:outgoing>
|
|
18
18
|
</bpmn:serviceTask>
|
|
19
|
-
<bpmn:sequenceFlow id="Flow_1khvymz" sourceRef="approve1" targetRef="hello2" />
|
|
20
|
-
<bpmn:userTask id="approve1" name="approve1" camunda:formKey="simpleapprove" camunda:assignee="kstan">
|
|
21
|
-
<bpmn:documentation>approve1 doc
|
|
22
|
-
abc</bpmn:documentation>
|
|
23
|
-
<bpmn:incoming>Flow_1rspxq4</bpmn:incoming>
|
|
24
|
-
<bpmn:outgoing>Flow_1khvymz</bpmn:outgoing>
|
|
25
|
-
</bpmn:userTask>
|
|
26
|
-
<bpmn:sequenceFlow id="Flow_1oty8vq" sourceRef="hello2" targetRef="Event_0qpgd23" />
|
|
27
|
-
<bpmn:serviceTask id="hello2" name="hello2">
|
|
28
|
-
<bpmn:documentation>hello2 doc
|
|
29
|
-
ccc</bpmn:documentation>
|
|
30
|
-
<bpmn:incoming>Flow_1khvymz</bpmn:incoming>
|
|
31
|
-
<bpmn:outgoing>Flow_1oty8vq</bpmn:outgoing>
|
|
32
|
-
</bpmn:serviceTask>
|
|
33
19
|
</bpmn:process>
|
|
34
20
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
35
21
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process1">
|
|
36
22
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
37
23
|
<dc:Bounds x="122" y="202" width="36" height="36" />
|
|
38
24
|
</bpmndi:BPMNShape>
|
|
39
|
-
<bpmndi:BPMNShape id="Event_0qpgd23_di" bpmnElement="Event_0qpgd23">
|
|
40
|
-
<dc:Bounds x="672" y="202" width="36" height="36" />
|
|
41
|
-
</bpmndi:BPMNShape>
|
|
42
25
|
<bpmndi:BPMNShape id="Activity_1trhs2m_di" bpmnElement="hello1">
|
|
43
26
|
<dc:Bounds x="200" y="180" width="100" height="80" />
|
|
44
27
|
<bpmndi:BPMNLabel />
|
|
45
28
|
</bpmndi:BPMNShape>
|
|
46
|
-
<bpmndi:BPMNShape id="
|
|
47
|
-
<dc:Bounds x="
|
|
48
|
-
<bpmndi:BPMNLabel />
|
|
49
|
-
</bpmndi:BPMNShape>
|
|
50
|
-
<bpmndi:BPMNShape id="Activity_1mg3y6c_di" bpmnElement="hello2">
|
|
51
|
-
<dc:Bounds x="510" y="180" width="100" height="80" />
|
|
52
|
-
<bpmndi:BPMNLabel />
|
|
29
|
+
<bpmndi:BPMNShape id="Event_0qpgd23_di" bpmnElement="Event_0qpgd23">
|
|
30
|
+
<dc:Bounds x="402" y="202" width="36" height="36" />
|
|
53
31
|
</bpmndi:BPMNShape>
|
|
54
32
|
<bpmndi:BPMNEdge id="Flow_1a63g0z_di" bpmnElement="Flow_1a63g0z">
|
|
55
33
|
<di:waypoint x="158" y="220" />
|
|
@@ -57,15 +35,7 @@ ccc</bpmn:documentation>
|
|
|
57
35
|
</bpmndi:BPMNEdge>
|
|
58
36
|
<bpmndi:BPMNEdge id="Flow_1rspxq4_di" bpmnElement="Flow_1rspxq4">
|
|
59
37
|
<di:waypoint x="300" y="220" />
|
|
60
|
-
<di:waypoint x="
|
|
61
|
-
</bpmndi:BPMNEdge>
|
|
62
|
-
<bpmndi:BPMNEdge id="Flow_1khvymz_di" bpmnElement="Flow_1khvymz">
|
|
63
|
-
<di:waypoint x="470" y="220" />
|
|
64
|
-
<di:waypoint x="510" y="220" />
|
|
65
|
-
</bpmndi:BPMNEdge>
|
|
66
|
-
<bpmndi:BPMNEdge id="Flow_1oty8vq_di" bpmnElement="Flow_1oty8vq">
|
|
67
|
-
<di:waypoint x="610" y="220" />
|
|
68
|
-
<di:waypoint x="672" y="220" />
|
|
38
|
+
<di:waypoint x="402" y="220" />
|
|
69
39
|
</bpmndi:BPMNEdge>
|
|
70
40
|
</bpmndi:BPMNPlane>
|
|
71
41
|
</bpmndi:BPMNDiagram>
|