@simitgroup/simpleapp-generator 1.6.6-j-alpha → 1.6.6-k.1-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/ReleaseNote.md +3 -2
- package/dist/buildinschemas/docnoformat.js +6 -6
- package/dist/buildinschemas/docnoformat.js.map +1 -1
- package/dist/buildinschemas/documentevent.js +1 -1
- package/dist/buildinschemas/documentevent.js.map +1 -1
- package/dist/buildinschemas/organization.js +1 -1
- package/dist/buildinschemas/organization.js.map +1 -1
- package/dist/buildinschemas/tenant.js +1 -1
- package/dist/buildinschemas/tenant.js.map +1 -1
- package/dist/buildinschemas/user.js +2 -2
- package/dist/buildinschemas/user.js.map +1 -1
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +2 -0
- package/dist/framework.js.map +1 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +21 -20
- package/dist/generate.js.map +1 -1
- package/dist/processors/jrxmlbuilder.js +3 -3
- package/dist/processors/jrxmlbuilder.js.map +1 -1
- package/dist/processors/jsonschemabuilder.d.ts.map +1 -1
- package/dist/processors/jsonschemabuilder.js +17 -10
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/dist/type.d.ts +1 -1
- package/dist/type.d.ts.map +1 -1
- package/package.json +1 -2
- package/reset-install.sh +3 -0
- package/src/buildinschemas/docnoformat.ts +6 -6
- package/src/buildinschemas/documentevent.ts +1 -1
- package/src/buildinschemas/organization.ts +1 -1
- package/src/buildinschemas/tenant.ts +1 -1
- package/src/buildinschemas/user.ts +2 -2
- package/src/framework.ts +2 -1
- package/src/generate.ts +22 -20
- package/src/processors/jrxmlbuilder.ts +3 -3
- package/src/processors/jsonschemabuilder.ts +27 -14
- package/src/type.ts +1 -1
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +3 -3
- package/templates/nest/.gitignore.eta +4 -5
- package/templates/nest/src/{app.module.ts.eta → app.module.ts._eta} +2 -2
- package/templates/nest/src/{main.ts.eta → main.ts._eta} +2 -2
- package/templates/nest/src/printapi/printapi.service.ts.eta +7 -8
- package/templates/nest/src/simpleapp/.gitignore.eta +1 -1
- package/templates/nest/src/simpleapp/additional.module.ts._eta +13 -0
- package/templates/nest/src/simpleapp/generate/commons/audittrail.service.ts.eta +2 -2
- package/templates/nest/src/simpleapp/generate/commons/customkeycloa.guard.ts.eta +14 -12
- package/templates/nest/src/simpleapp/generate/commons/customkeycloak.guard.ts.eta +36 -42
- package/templates/nest/src/simpleapp/generate/commons/docnogenerator.service.ts.eta +6 -3
- package/templates/nest/src/simpleapp/generate/commons/encryption.static.ts.eta +56 -61
- package/templates/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +65 -88
- package/templates/nest/src/simpleapp/generate/commons/robotuser.service.ts.eta +10 -9
- package/templates/nest/src/simpleapp/generate/commons/roles/roles.guard.ts.eta +10 -3
- package/templates/nest/src/simpleapp/generate/commons/runwebhook.service.ts.eta +41 -39
- package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +439 -293
- package/templates/nest/src/simpleapp/generate/processors/autoinc.processor.ts.eta +20 -5
- package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +437 -40
- package/templates/nest/src/simpleapp/profile/{profile.controller.ts.eta → profile.controller.ts._eta} +2 -2
- package/templates/nest/src/simpleapp/profile/{profile.service.ts.eta → profile.service.ts._eta} +2 -2
- package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +19 -15
- package/templates/nuxt/components/button/ButtonMultiple.vue._eta +1 -1
- package/templates/nuxt/components/calendar/{CalendarByResource.vue.eta → CalendarByResource.vue._eta} +2 -2
- package/templates/nuxt/components/calendar/{CalendarInput.vue.eta → CalendarInput.vue._eta} +2 -2
- package/templates/nuxt/components/calendar/{CalendarSmall.vue.eta → CalendarSmall.vue._eta} +6 -0
- package/templates/nuxt/components/debug/{DebugDocumentData.vue.eta → DebugDocumentData.vue._eta} +2 -2
- package/templates/nuxt/components/form/{FormDocnoformat.vue.eta → FormDocnoformat.vue._eta} +2 -1
- package/templates/nuxt/components/form/user/{FormUserPermission.vue.eta → FormUserPermission.vue._eta} +6 -0
- package/templates/nuxt/components/header/{HeaderBreadcrumb.vue.eta → HeaderBreadcrumb.vue._eta} +2 -2
- package/templates/nuxt/components/header/button/{HeaderButtonProfile.vue.eta → HeaderButtonProfile.vue._eta} +2 -2
- package/templates/nuxt/components/header/button/task/{HeaderButtonTaskList.vue.eta → HeaderButtonTaskList.vue._eta} +2 -2
- package/templates/nuxt/components/image/ImageAvatar.vue.eta +29 -30
- package/templates/nuxt/components/image/ImageOrganization.vue.eta +15 -9
- package/templates/nuxt/components/image/ImageToBase64Uploader.vue.eta +28 -18
- package/templates/nuxt/components/list/{ListDocumentTable.vue.eta → ListDocumentTable.vue._eta} +2 -2
- package/templates/nuxt/components/list/{ListItem.vue.eta → ListItem.vue._eta} +2 -2
- package/templates/nuxt/components/list/{ListMessages.vue.eta → ListMessages.vue._eta} +6 -0
- package/templates/nuxt/components/list/{ListView.vue.eta → ListView.vue._eta} +2 -2
- package/templates/nuxt/components/overlay/{OverlayPanelWithToolBar.vue.eta → OverlayPanelWithToolBar.vue._eta} +2 -2
- package/templates/nuxt/components/overlay/{OverlaySideBarCrud.vue.eta → OverlaySideBarCrud.vue._eta} +2 -2
- package/templates/nuxt/components/overlay/{OverlayViewer.vue.eta → OverlayViewer.vue._eta} +2 -2
- package/templates/nuxt/components/page/{PageDocList.vue.eta → PageDocList.vue._eta} +2 -2
- package/templates/nuxt/components/renderer/{RendererDateTime.vue.eta → RendererDateTime.vue._eta} +2 -2
- package/templates/nuxt/components/renderer/{RendererDocHistories.vue.eta → RendererDocHistories.vue._eta} +6 -0
- package/templates/nuxt/components/renderer/{RendererForeignKey.vue.eta → RendererForeignKey.vue._eta} +2 -2
- package/templates/nuxt/components/renderer/{RendererLink.vue.eta → RendererLink.vue._eta} +2 -2
- package/templates/nuxt/components/renderer/{RendererTime.vue.eta → RendererTime.vue._eta} +2 -2
- package/templates/nuxt/components/renderer/{RendererViewer.vue.eta → RendererViewer.vue._eta} +2 -2
- package/templates/nuxt/components/select/{SelectTemplate.vue.eta → SelectTemplate.vue._eta} +2 -2
- package/templates/nuxt/components/session/{SessionBlock.vue.eta → SessionBlock.vue._eta} +2 -2
- package/templates/nuxt/components/simpleApp/SimpleAppAutocomplete.vue.eta +55 -55
- package/templates/nuxt/components/simpleApp/SimpleAppCalendarInput.vue.eta +13 -11
- package/templates/nuxt/components/simpleApp/SimpleAppChildrenList.vue.eta +6 -3
- package/templates/nuxt/components/simpleApp/SimpleAppDocumentNo.vue.eta +32 -27
- package/templates/nuxt/components/simpleApp/SimpleAppFieldContainer.vue.eta +19 -28
- package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +114 -105
- package/templates/nuxt/components/simpleApp/SimpleAppInputTable.vue.eta +3 -3
- package/templates/nuxt/components/simpleApp/SimpleAppJsonSchemaForm.vue.eta +1 -1
- package/templates/nuxt/components/simpleApp/SimpleAppUserPicker.vue.eta +10 -12
- package/templates/nuxt/components/table/{TableDocuments.vue.eta → TableDocuments.vue._eta} +2 -2
- package/templates/nuxt/components/user/{UserButtonPermissionInfo.vue.eta → UserButtonPermissionInfo.vue._eta} +2 -2
- package/templates/nuxt/components/user/{UserInvitation.vue.eta → UserInvitation.vue._eta} +2 -2
- package/templates/nuxt/components/user/{UserProfileListItem.vue.eta → UserProfileListItem.vue._eta} +2 -2
- package/templates/nuxt/components/user/{UserTenantPicker.vue.eta → UserTenantPicker.vue._eta} +2 -2
- package/templates/nuxt/composables/getOpenApi.generate.ts.eta +11 -3
- package/templates/nuxt/composables/getUserStore.generate.ts.eta +1 -1
- package/templates/nuxt/composables/graphquery.generate.ts.eta +1 -1
- package/templates/nuxt/composables/recently.generate.ts.eta +0 -1
- package/templates/nuxt/composables/stringHelper.generate.ts.eta +5 -2
- package/templates/nuxt/pages/[xorg]/docnoformat/[id].vue.eta +0 -1
- package/templates/nuxt/pages/[xorg]/{docnoformat.vue.eta → docnoformat.vue._eta} +1 -0
- package/templates/nuxt/pages/[xorg]/organization/[id].vue.eta +13 -9
- package/templates/nuxt/pages/[xorg]/organization/new.vue.eta +10 -12
- package/templates/nuxt/pages/[xorg]/{user.vue.eta → user.vue._eta} +2 -2
- package/templates/nuxt/pages/{profile.vue.eta → profile.vue._eta} +2 -2
- package/templates/nuxt/plugins/10.simpleapp-event.ts.eta +6 -0
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +89 -12
- package/templates/nuxt/plugins/40.pusher.ts.eta +6 -9
- package/templates/nuxt/providers/my-provider.ts.eta +1 -1
- package/templates/nuxt/server/api/profile/[...].ts.eta +4 -3
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +8 -4
- package/templates/nuxt/types/schema.ts.eta +1 -1
- package/templates/nuxt/types/user.ts.eta +6 -1
- package/templates/project/jsonschemas/appintegration.json_eta +227 -0
- package/templates/project/sharelibs/validate.ts.eta +1 -1
- package/dist/buildinschemas/message.d.ts +0 -3
- package/dist/buildinschemas/message.d.ts.map +0 -1
- package/dist/buildinschemas/message.js +0 -34
- package/dist/buildinschemas/message.js.map +0 -1
- package/dist/buildinschemas/webhookhistory.d.ts +0 -3
- package/dist/buildinschemas/webhookhistory.d.ts.map +0 -1
- package/dist/buildinschemas/webhookhistory.js +0 -44
- package/dist/buildinschemas/webhookhistory.js.map +0 -1
- package/dist/createproject.js +0 -138
- package/dist/createproject.js.map +0 -1
- package/dist/generate-allow-changebackend.js +0 -305
- package/dist/generate-allow-changebackend.js.map +0 -1
- package/dist/index2.js +0 -118
- package/dist/index2.js.map +0 -1
- package/dist/installdependency.js +0 -20
- package/dist/installdependency.js.map +0 -1
- package/dist/installnest.js +0 -2
- package/dist/installnest.js.map +0 -1
- package/dist/installnuxt.js +0 -2
- package/dist/installnuxt.js.map +0 -1
- package/dist/processors/groupsbuilder.js +0 -2
- package/dist/processors/groupsbuilder.js.map +0 -1
- package/dist/schematype/baseschema.js +0 -25
- package/dist/schematype/baseschema.js.map +0 -1
- package/dist/schematype/default.js +0 -2
- package/dist/schematype/default.js.map +0 -1
- package/dist/schematype/index.js +0 -12
- package/dist/schematype/index.js.map +0 -1
- package/dist/schematype/primarymasterdata.js +0 -38
- package/dist/schematype/primarymasterdata.js.map +0 -1
- package/dist/schematype/simple.js +0 -24
- package/dist/schematype/simple.js.map +0 -1
- package/dist/schematype/simplemasterdata.js +0 -31
- package/dist/schematype/simplemasterdata.js.map +0 -1
- package/dist/schematype/transaction.js +0 -74
- package/dist/schematype/transaction.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="readonly"
|
|
4
|
-
class="p-2 border rounded-lg border-gray-300
|
|
4
|
+
class="p-2 border rounded-lg border-gray-300 flex h-input items-center"
|
|
5
5
|
>
|
|
6
6
|
<button
|
|
7
7
|
type="button"
|
|
8
8
|
:readonly="readonly"
|
|
9
|
-
class="cursor-pointer text-primary-600
|
|
9
|
+
class="cursor-pointer text-primary-600"
|
|
10
10
|
tabindex="0"
|
|
11
11
|
@click="openViewer(true)"
|
|
12
12
|
>
|
|
@@ -15,70 +15,71 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
<div
|
|
17
17
|
v-else-if="modelValue !== undefined"
|
|
18
|
-
class="
|
|
18
|
+
class="px-3 border rounded-lg border-gray-300 flex h-input items-center"
|
|
19
19
|
>
|
|
20
|
-
|
|
20
|
+
<!-- readonly -->
|
|
21
21
|
<button
|
|
22
|
+
:id="inputId"
|
|
22
23
|
ref="autocompleteinput"
|
|
23
24
|
type="button"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class="cursor-pointer text-primary-600 dark:text-primary-400"
|
|
27
|
-
@click="openViewer(true)"
|
|
25
|
+
class="cursor-pointer text-primary-600 flex-1 text-left"
|
|
26
|
+
@click="openViewer(false)"
|
|
28
27
|
>
|
|
29
28
|
{{ modelValue && modelValue.label ? modelValue.label : "-" }}
|
|
30
29
|
</button>
|
|
31
30
|
|
|
32
31
|
<div
|
|
33
|
-
class="
|
|
32
|
+
class="text-right text-white align-middle"
|
|
34
33
|
>
|
|
35
34
|
<button
|
|
36
|
-
|
|
35
|
+
type="button"
|
|
37
36
|
class="pi pi-times rounded-full bg-slate-500 p-1 cursor-pointer text-xs"
|
|
38
|
-
@click="clear"
|
|
39
37
|
tabindex="0"
|
|
40
|
-
|
|
38
|
+
@click="clear"
|
|
39
|
+
/>
|
|
41
40
|
</div>
|
|
42
41
|
</div>
|
|
43
42
|
<div v-else class="relative">
|
|
44
43
|
<div
|
|
45
|
-
class="absolute h-full top-0 right-10 text-right text-white z-10 align-middle p-3"
|
|
46
44
|
v-if="modelValue?._id"
|
|
45
|
+
class="absolute h-full top-0 right-10 text-right text-white z-10 align-middle py-2 px-3"
|
|
47
46
|
>
|
|
48
47
|
<span
|
|
49
48
|
class="pi pi-times rounded-full bg-slate-500 p-1 cursor-pointer text-xs"
|
|
50
49
|
@click="clear"
|
|
51
|
-
|
|
50
|
+
/>
|
|
52
51
|
</div>
|
|
53
52
|
|
|
54
53
|
<AutoComplete
|
|
55
54
|
v-if="!isMobile()"
|
|
56
|
-
class="w-full"
|
|
57
|
-
v-model="autocompleteitem"
|
|
58
55
|
ref="autocompleteinput"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
v-model="autocompleteitem"
|
|
57
|
+
pt:root="w-full"
|
|
58
|
+
pt:pcInputText:root="w-full rounded-r-none"
|
|
59
|
+
pt:dropdown="min-w-10"
|
|
60
|
+
force-selection
|
|
61
|
+
option-label="label"
|
|
64
62
|
:placeholder="placeholdertxt"
|
|
65
63
|
:dropdown="true"
|
|
66
|
-
@clear="clear"
|
|
67
64
|
:dropdown-mode="'current'"
|
|
68
65
|
:readonly="readonly"
|
|
69
66
|
:pt="pt"
|
|
70
67
|
:delay="500"
|
|
71
68
|
:disabled="readonly"
|
|
72
|
-
@click="clickAutocomplete"
|
|
73
69
|
:suggestions="list"
|
|
74
|
-
|
|
75
|
-
:inputId="inputId"
|
|
70
|
+
:input-id="inputId"
|
|
76
71
|
:path="setting.instancepath"
|
|
72
|
+
@focus="setFocus"
|
|
73
|
+
@item-select="pickAutoComplete"
|
|
74
|
+
@complete="getListFromAutocompleteApi"
|
|
75
|
+
@clear="clear"
|
|
76
|
+
@click="clickAutocomplete"
|
|
77
|
+
@blur="onBlurAutocomplete"
|
|
77
78
|
>
|
|
78
79
|
<template #header>
|
|
79
80
|
<slot name="header">
|
|
80
81
|
<div
|
|
81
|
-
class="flex flex-row font font-semibold text-sm
|
|
82
|
+
class="flex flex-row font font-semibold text-sm gap-2 p-2"
|
|
82
83
|
>
|
|
83
84
|
<div class="w w-1/3 line-clamp-1">
|
|
84
85
|
{{ t(codefield) ?? t("code") }}
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
</template>
|
|
95
96
|
<template #option="{ index, option }">
|
|
96
97
|
<slot name="option" :index="index" :option="option">
|
|
97
|
-
<div class="flex flex-row
|
|
98
|
+
<div class="flex flex-row text-sm gap-2">
|
|
98
99
|
<div class="w w-1/3 line-clamp-1">{{ option.code }}</div>
|
|
99
100
|
<div class="w w-2/3 line-clamp-1">{{ option.label }}</div>
|
|
100
101
|
</div>
|
|
@@ -106,35 +107,35 @@
|
|
|
106
107
|
<InputGroup class="w-full flex flex-row">
|
|
107
108
|
<InputText
|
|
108
109
|
:value="modelValue?.label"
|
|
109
|
-
@focus="showAutocompleteDialog(false)"
|
|
110
110
|
:placeholder="placeholdertxt"
|
|
111
111
|
class="rounded-r-none"
|
|
112
|
-
|
|
112
|
+
@focus="showAutocompleteDialog(false)"
|
|
113
|
+
/>
|
|
113
114
|
<InputGroupAddon
|
|
114
|
-
@click="showAutocompleteDialog(true)"
|
|
115
115
|
v-ripple
|
|
116
|
-
class="bg bg-primary-600
|
|
116
|
+
class="bg bg-primary-600 text-white rounded-r-lg p-3"
|
|
117
|
+
@click="showAutocompleteDialog(true)"
|
|
117
118
|
>
|
|
118
|
-
<i :class="`pi ${modelValue ? 'pi-link' : 'pi-angle-down'}`"
|
|
119
|
+
<i :class="`pi ${modelValue ? 'pi-link' : 'pi-angle-down'}`" />
|
|
119
120
|
</InputGroupAddon>
|
|
120
121
|
</InputGroup>
|
|
121
122
|
|
|
122
123
|
<OverlaySideBarCrud
|
|
123
124
|
v-model="mobileVisible"
|
|
124
|
-
|
|
125
|
+
close-event-name="autocompleteoverlay"
|
|
125
126
|
>
|
|
126
127
|
<template v-if="mobileListMode == 'list'">
|
|
127
128
|
<mobile-toolbar>
|
|
128
129
|
<template #start>
|
|
129
130
|
<ButtonText @click="mobileVisible = false">
|
|
130
|
-
<i class="pi pi-times"
|
|
131
|
+
<i class="pi pi-times"/>
|
|
131
132
|
</ButtonText>
|
|
132
133
|
</template>
|
|
133
134
|
<template #center>
|
|
134
135
|
<TextTitle class="text-white">{{ t(docname) }}</TextTitle>
|
|
135
136
|
</template>
|
|
136
137
|
<template #end>
|
|
137
|
-
<div
|
|
138
|
+
<div/>
|
|
138
139
|
<!-- <ButtonText @click="openViewer(false)">
|
|
139
140
|
<i class="pi pi-plus"></i>
|
|
140
141
|
</ButtonText> -->
|
|
@@ -142,12 +143,12 @@
|
|
|
142
143
|
</mobile-toolbar>
|
|
143
144
|
<ListView
|
|
144
145
|
:list="list"
|
|
145
|
-
:
|
|
146
|
-
:
|
|
147
|
-
|
|
148
|
-
titleField="code"
|
|
149
|
-
subTitleField="label"
|
|
146
|
+
:with-filter="true"
|
|
147
|
+
:default-filter-value="defaultFilterValue"
|
|
148
|
+
id-field="_id"
|
|
150
149
|
#default="{ item, index }"
|
|
150
|
+
title-field="code"
|
|
151
|
+
sub-title-field="label"
|
|
151
152
|
@click="onClickInMobile"
|
|
152
153
|
>
|
|
153
154
|
<div class="flex flex-row justify-end">
|
|
@@ -242,13 +243,12 @@ if (modelValue.value && modelValue.value._id) {
|
|
|
242
243
|
const clear = () => {
|
|
243
244
|
autocompleteitem.value = undefined;
|
|
244
245
|
modelValue.value = undefined;
|
|
245
|
-
if(!isMobile()){
|
|
246
|
-
setTimeout(()=>{
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
if (!isMobile()) {
|
|
247
|
+
setTimeout(() => {
|
|
248
|
+
const autoel = autocompleteinput.value.$el;
|
|
249
|
+
autoel?.firstElementChild?.focus();
|
|
250
|
+
}, 100);
|
|
250
251
|
}
|
|
251
|
-
|
|
252
252
|
};
|
|
253
253
|
|
|
254
254
|
//if record picked, click button show record info instead
|
|
@@ -294,7 +294,7 @@ const getListFromAutocompleteApi = (event: any) => {
|
|
|
294
294
|
getDocumentApi(targetDocument)
|
|
295
295
|
.autoComplete(keyword, morefilter)
|
|
296
296
|
.then((res: any) => {
|
|
297
|
-
console.log("Run autocomplete?");
|
|
297
|
+
// console.log("Run autocomplete?");
|
|
298
298
|
list.value = res.data;
|
|
299
299
|
|
|
300
300
|
if (
|
|
@@ -338,12 +338,12 @@ watch(modelValue, (newvalue: any) => {
|
|
|
338
338
|
});
|
|
339
339
|
const emitChanges = () => {
|
|
340
340
|
emits("change", modelValue.value);
|
|
341
|
-
if(!isMobile()){
|
|
342
|
-
setTimeout(()=>{
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
341
|
+
if (!isMobile()) {
|
|
342
|
+
setTimeout(() => {
|
|
343
|
+
const autoel = autocompleteinput.value;
|
|
344
|
+
autoel?.firstElementChild?.focus();
|
|
345
|
+
}, 100);
|
|
346
|
+
}
|
|
347
347
|
};
|
|
348
348
|
|
|
349
349
|
const setFocus = (ev: any) => {
|
|
@@ -399,7 +399,7 @@ const afterRenderMobileForm = async (
|
|
|
399
399
|
data: any,
|
|
400
400
|
result: any,
|
|
401
401
|
) => {
|
|
402
|
-
console.log("afterRenderMobileForm", eventType);
|
|
402
|
+
// console.log("afterRenderMobileForm", eventType);
|
|
403
403
|
if (eventType == FormCrudEvent.create || eventType == FormCrudEvent.update) {
|
|
404
404
|
autocompleteitem.value = {
|
|
405
405
|
_id: data._id,
|
|
@@ -423,7 +423,7 @@ const afterRenderMobileForm = async (
|
|
|
423
423
|
};
|
|
424
424
|
|
|
425
425
|
const clickAutocomplete = (a, b) => {
|
|
426
|
-
console.log("clickAutocomplete", a, b);
|
|
426
|
+
// console.log("clickAutocomplete", a, b);
|
|
427
427
|
return false;
|
|
428
428
|
};
|
|
429
429
|
</script>
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DatePicker
|
|
3
|
+
v-model="datetimevalue"
|
|
3
4
|
:pt="pt"
|
|
4
|
-
:
|
|
5
|
-
:
|
|
5
|
+
:date-format="getPrimevueCalendarDateFormat()"
|
|
6
|
+
:input-id="uuid"
|
|
6
7
|
:path="setting.instancepath"
|
|
7
|
-
|
|
8
|
-
@update:modelValue="updateDateTime"
|
|
9
|
-
showButtonBar
|
|
8
|
+
show-button-bar
|
|
10
9
|
:readonly="readonly"
|
|
11
10
|
:placeholder="placeholder"
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
|
|
15
|
-
v-bind="componentProps"
|
|
11
|
+
:show-time="showtime"
|
|
12
|
+
:time-only="timeOnly"
|
|
13
|
+
hour-format="12"
|
|
14
|
+
v-bind="<CalendarProps>componentProps"
|
|
15
|
+
:select-other-months="true"
|
|
16
|
+
pt:pcInputText:root="w-full"
|
|
17
|
+
@update:model-value="updateDateTime"
|
|
16
18
|
/>
|
|
17
19
|
</template>
|
|
18
20
|
<script setup lang="ts">
|
|
19
21
|
// :date-format="getDateFormat()"
|
|
20
|
-
import {
|
|
22
|
+
import type { CalendarProps } from "primevue/calendar";
|
|
21
23
|
const props = defineProps<{
|
|
22
24
|
pt: any;
|
|
23
25
|
uuid: string;
|
|
24
26
|
placeholder?: string;
|
|
25
27
|
setting: any;
|
|
26
28
|
readonly?: boolean;
|
|
27
|
-
componentProps?:
|
|
29
|
+
componentProps?: CalendarProps;
|
|
28
30
|
type: "date" | "time" | "datetime";
|
|
29
31
|
}>();
|
|
30
32
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex flex-col">
|
|
3
|
-
<div class="flex flex-row gap-2">
|
|
3
|
+
<div class="flex flex-row gap-2 mt-3">
|
|
4
4
|
<TextTitle v-if="title" class="flex-1">{{ title }}</TextTitle>
|
|
5
5
|
|
|
6
6
|
<div class="flex flex-row"><slot name="buttons"></slot></div>
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
</ButtonDefault>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
+
<div class="text-xs italic text-gray-400" v-if="inputDescription">{{ inputDescription }}</div>
|
|
15
|
+
|
|
14
16
|
<ListContainer
|
|
15
|
-
class="p-2
|
|
17
|
+
class="p-2 bg-slate-200 rounded-lg mt-3"
|
|
16
18
|
:list="list"
|
|
17
|
-
#default="{item,index }"
|
|
19
|
+
#default="{ item, index }"
|
|
18
20
|
@click="showRow"
|
|
19
21
|
>
|
|
20
22
|
<slot name="listbody" :item="item" :index="index">
|
|
@@ -61,6 +63,7 @@ const props = defineProps<{
|
|
|
61
63
|
addNew?: boolean;
|
|
62
64
|
readonly?: boolean;
|
|
63
65
|
doc: SimpleAppClient<any, any>;
|
|
66
|
+
inputDescription: string
|
|
64
67
|
}>();
|
|
65
68
|
const readonly = computed(() => {
|
|
66
69
|
if (props.readonly) return true;
|
|
@@ -1,43 +1,48 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<InputGroup class="flex flex-row w-full">
|
|
3
3
|
<InputText
|
|
4
|
-
@focus="setFocus"
|
|
5
|
-
:readonly="readonly"
|
|
6
4
|
v-model="modelValue"
|
|
5
|
+
:readonly="readonly"
|
|
7
6
|
:placeholder="placeholder"
|
|
8
7
|
:pt="pt"
|
|
9
8
|
:class="
|
|
10
9
|
!pt
|
|
11
10
|
? 'flex-1 w-full rounded-lg ' +
|
|
12
|
-
(props.readonly || !props.setting.document.isNew()
|
|
11
|
+
(props.readonly || !props.setting.document.isNew()
|
|
12
|
+
? ''
|
|
13
|
+
: 'rounded-tr-none rounded-br-none')
|
|
13
14
|
: ''
|
|
14
15
|
"
|
|
16
|
+
@focus="setFocus"
|
|
15
17
|
/>
|
|
16
|
-
<span class=""
|
|
17
|
-
<
|
|
18
|
-
v-
|
|
19
|
-
type="button"
|
|
20
|
-
@click="toggle"
|
|
18
|
+
<!-- <span class=""> -->
|
|
19
|
+
<Button
|
|
20
|
+
v-if="!readonly && props.setting.document.isNew()"
|
|
21
21
|
tabindex="-1"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
icon="pi pi-angle-down"
|
|
23
|
+
@click="toggle"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<!-- </span> -->
|
|
27
|
+
<Popover ref="op">
|
|
28
|
+
<ul>
|
|
29
|
+
<li
|
|
30
|
+
v-for="(docno, index) in docFormatlist"
|
|
31
|
+
:key="index"
|
|
32
|
+
class="hover-list-primary p-2"
|
|
33
|
+
>
|
|
34
|
+
<div
|
|
35
|
+
class="flex flex-row gap-2 cursor-pointer"
|
|
36
|
+
@click="chooseFormat(docno)"
|
|
37
|
+
>
|
|
38
|
+
<span class="">{{ docno.docNoFormatName }}</span>
|
|
39
|
+
<span class="text text-green-600">{{ docno.sample }}</span>
|
|
40
|
+
</div>
|
|
41
|
+
</li>
|
|
42
|
+
</ul>
|
|
43
|
+
</Popover>
|
|
39
44
|
<!-- {{ Object.getOwnPropertyNames(setting) }} -->
|
|
40
|
-
</
|
|
45
|
+
</InputGroup>
|
|
41
46
|
</template>
|
|
42
47
|
<script lang="ts" setup>
|
|
43
48
|
/**
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="schema" :class="getLayoutClass()">
|
|
3
|
-
<label v-if="hidelabel"
|
|
4
|
-
|
|
5
|
-
>{{ fieldlabel }}
|
|
3
|
+
<label v-if="!hidelabel" :for="uuid" :class="getLabelClass()">
|
|
4
|
+
{{ fieldlabel }}
|
|
6
5
|
<span
|
|
7
6
|
v-if="props.setting.isrequired && fieldlabel"
|
|
8
7
|
class="text-danger-600 dark:text-danger-400"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<!-- <label v-else-if="error" class="simpleapp-input-label text-danger-600 overflow-hidden" :for="uuid">{{ fieldlabel }} <span v-if="props.setting.isrequired && fieldlabel" class="text-danger-600">*</span></label>
|
|
13
|
-
<label v-else :for="uuid" class="simpleapp-input-label whitespace-nowrap text-gray-500 truncate">{{ fieldlabel }} <span v-if="props.setting.isrequired && fieldlabel" class="text-danger-600">*</span></label> -->
|
|
14
|
-
|
|
15
|
-
<!-- <div :uuid="uuid" >{{ modelValue }}</div> -->
|
|
16
|
-
<!-- <div v-if="typeof modelValue =='object' && typeof modelValue['_id']!='undefined' && typeof modelValue['label']!='undefined' && readonly ==true " :uuid="uuid" class="simpleapp-value-readonly">{{ modelValue['label'] }}</div> -->
|
|
17
|
-
<!-- <div v-else-if="readonly==true" :uuid="uuid" class="simpleapp-value-readonly">{{ modelValue }}</div> -->
|
|
18
|
-
<!-- <slot v-else name="default" :uuid="uuid" :error="error"></slot> -->
|
|
19
|
-
<slot name="default" :uuid="uuid" :error="error"></slot>
|
|
8
|
+
>*</span>
|
|
9
|
+
</label>
|
|
10
|
+
<slot name="default" :uuid="uuid" :error="error"/>
|
|
20
11
|
|
|
21
12
|
<small v-if="error" class="text-danger-600 dark:text-danger-400">{{
|
|
22
13
|
error
|
|
@@ -24,7 +15,7 @@
|
|
|
24
15
|
<small v-else class="input-desc">{{ fielddesc }}</small>
|
|
25
16
|
</div>
|
|
26
17
|
<div v-else :class="defaultcssclass">
|
|
27
|
-
<label class="
|
|
18
|
+
<label class="text-danger-600 dark:text-danger-400"
|
|
28
19
|
>wrong path in getField()</label
|
|
29
20
|
>
|
|
30
21
|
<div class="text-danger-600 dark:text-danger-400">
|
|
@@ -33,7 +24,7 @@
|
|
|
33
24
|
</div>
|
|
34
25
|
</template>
|
|
35
26
|
<script setup lang="ts">
|
|
36
|
-
import SimpleAppValue from "./SimpleAppValue.vue";
|
|
27
|
+
// import SimpleAppValue from "./SimpleAppValue.vue";
|
|
37
28
|
/**
|
|
38
29
|
* This file was automatically generated by simpleapp generator. Every
|
|
39
30
|
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
@@ -73,25 +64,24 @@ const readonlyclass = "simpleapp-value-readonly";
|
|
|
73
64
|
let schema: any;
|
|
74
65
|
|
|
75
66
|
const getLayoutClass = () =>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}`;
|
|
67
|
+
"simpleapp-input-container flex flex-col";
|
|
68
|
+
// `simpleapp-input-container flex ${
|
|
69
|
+
// props.inputType == "checkbox" ? " flex flex-col " : "flex flex-col "
|
|
70
|
+
// }`;
|
|
81
71
|
|
|
82
72
|
const getLabelClass = () => {
|
|
83
73
|
let class1 =
|
|
84
|
-
"simpleapp-input-label text-left text-gray-500
|
|
74
|
+
"simpleapp-input-label text-left text-gray-500 ";
|
|
85
75
|
|
|
86
76
|
if (!isMobile()) class1 += "whitespace-nowrap truncate";
|
|
87
|
-
else if (props.inputType == "checkbox") class1 += " ml-1
|
|
77
|
+
else if (props.inputType == "checkbox") class1 += " ml-1";
|
|
88
78
|
else if (props.inputType != "autocomplete" && modelValue.value)
|
|
89
|
-
class1 += "-mb-4 ml-1 z-10 text-xs
|
|
79
|
+
class1 += "-mb-4 ml-1 z-10 text-xs";
|
|
90
80
|
else if (props.inputType == "autocomplete" && modelValue.value?.label)
|
|
91
|
-
class1 += "-mb-4 ml-1 z-10 text-xs
|
|
81
|
+
class1 += "-mb-4 ml-1 z-10 text-xs";
|
|
92
82
|
else if (modelValue.value !== undefined)
|
|
93
|
-
class1 += "-mb-4 ml-1 z-10 text-xs
|
|
94
|
-
else class1 += "-mb-4 ml-1 z-10 text-xs
|
|
83
|
+
class1 += "-mb-4 ml-1 z-10 text-xs";
|
|
84
|
+
else class1 += "-mb-4 ml-1 z-10 text-xs ";
|
|
95
85
|
return class1;
|
|
96
86
|
};
|
|
97
87
|
|
|
@@ -133,8 +123,9 @@ watch(props.setting.errors, (newvalue, oldvalue) => {
|
|
|
133
123
|
if (newvalue[instancepath.value]) {
|
|
134
124
|
const errlist: any[] = newvalue[instancepath.value];
|
|
135
125
|
for (let i = 0; i < errlist.length; i++) {
|
|
136
|
-
error.value += errlist[i].message + ",";
|
|
126
|
+
error.value += errlist[i].message + ", ";
|
|
137
127
|
}
|
|
128
|
+
error.value = error.value.slice(0, -2);
|
|
138
129
|
fieldcontainerclass.value = defaultcssclass + " input-error";
|
|
139
130
|
} else {
|
|
140
131
|
error.value = "";
|