@simitgroup/simpleapp-generator 1.0.63 → 1.1.0
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/README copy.md +9 -9
- package/buildinschemas copy/autoincreament.autoinc.jsonschema.json +1 -1
- package/buildinschemas copy/docnoformat.docno.jsonschema.json +2 -2
- package/dist/buildinschemas/autoincreament.js +6 -6
- package/dist/buildinschemas/branch.js +3 -3
- package/dist/buildinschemas/branch.js.map +1 -1
- package/dist/buildinschemas/docnoformat.js +5 -5
- package/dist/buildinschemas/docnoformat.js.map +1 -1
- package/dist/buildinschemas/organization.js +3 -3
- package/dist/buildinschemas/permission.js +5 -5
- package/dist/buildinschemas/permission.js.map +1 -1
- package/dist/buildinschemas/tenant.js +2 -2
- package/dist/buildinschemas/user.d.ts.map +1 -1
- package/dist/buildinschemas/user.js +3 -4
- package/dist/buildinschemas/user.js.map +1 -1
- package/dist/generate.js +2 -2
- package/dist/generate.js.map +1 -1
- package/dist/processors/jsonschemabuilder.d.ts.map +1 -1
- package/dist/processors/jsonschemabuilder.js +6 -6
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/dist/type.d.ts +7 -19
- package/dist/type.d.ts.map +1 -1
- package/docs/backend.md +2 -2
- package/docs/jsonschema.md +6 -6
- package/package.json +1 -1
- package/src/buildinschemas/autoincreament.ts +6 -6
- package/src/buildinschemas/branch.ts +3 -3
- package/src/buildinschemas/docnoformat.ts +5 -5
- package/src/buildinschemas/organization.ts +3 -3
- package/src/buildinschemas/permission.ts +5 -5
- package/src/buildinschemas/tenant.ts +2 -2
- package/src/buildinschemas/user.ts +4 -5
- package/src/generate.ts +2 -2
- package/src/processors/jsonschemabuilder.ts +7 -9
- package/src/processors/jsonschemabuilder.ts-old +5 -5
- package/src/type.ts +20 -20
- package/templates/basic/nest/controller.ts.eta +18 -18
- package/templates/basic/nest/processor.ts.eta +1 -1
- package/templates/basic/nuxt/pages.[id].vue.eta +1 -1
- package/templates/basic/nuxt/pages.landing.vue.eta +12 -17
- package/templates/basic/nuxt/{pages.crud.vue.eta → pages.new.vue.eta} +68 -71
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +6 -6
- package/templates/nest/src/simpleapp/generate/commons/interceptors/response.interceptor.ts.eta +1 -1
- package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +20 -10
- package/templates/nest/src/simpleapp/generate/models/apievent.model.ts.eta +1 -1
- package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +8 -9
- package/templates/nest/src/simpleapp/generate/types/apievent.type.ts.eta +1 -1
- package/templates/nest/src/simpleapp/profile/profile.service.ts.eta +16 -7
- package/templates/nest/src/simpleapp/services/autoinc.service.ts.eta +10 -7
- package/templates/nest/src/simpleapp/services/branch.service.ts.eta +2 -2
- package/templates/nuxt/assets/css/style.css._eta +32 -0
- package/templates/nuxt/assets/primevue/passthrough.ts._eta +9 -2
- package/templates/nuxt/components/{DebugDocumentData.vue.eta → debug/DebugDocumentData.vue.eta} +8 -4
- package/templates/nuxt/components/{EventNotification.vue.eta → event/EventNotification.vue.eta} +13 -9
- package/templates/nuxt/components/{HeaderBar.vue.eta → header/HeaderBar.vue.eta} +6 -6
- package/templates/nuxt/components/{SelectBranch.vue.eta → header/HeaderSelectBranch.vue.eta} +2 -2
- package/templates/nuxt/components/{ButtonMenuPicker.vue.eta → header/button/HeaderButtonMenuPicker.vue.eta} +3 -3
- package/templates/nuxt/components/list/ListView.vue.eta +64 -0
- package/templates/nuxt/components/renderer/RendererForeignKey.vue.eta +11 -0
- package/templates/nuxt/components/renderer/index.ts.eta +12 -0
- package/templates/nuxt/components/simpleApp/SimpleAppDocumentNo.vue.eta +77 -0
- package/templates/nuxt/components/{SimpleFieldContainer.vue.eta → simpleApp/SimpleAppFieldContainer.vue.eta} +12 -11
- package/templates/nuxt/components/{SimpleAppForm.vue.eta → simpleApp/SimpleAppForm.vue.eta} +5 -4
- package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +288 -0
- package/templates/nuxt/components/simpleApp/SimpleAppInputTable.vue.eta +56 -0
- package/templates/nuxt/components/{SimpleAppAutocomplete.vue.eta → simpleApp/pending/SimpleAppAutocomplete.vue} +14 -3
- package/templates/nuxt/components/{SimpleAppAutocompletemulti.vue.eta → simpleApp/pending/SimpleAppAutocompletemulti.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppCalendar.vue.eta → simpleApp/pending/SimpleAppCalendar.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppCheckbox.vue.eta → simpleApp/pending/SimpleAppCheckbox.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppChip.vue.eta → simpleApp/pending/SimpleAppChip.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppColor.vue.eta → simpleApp/pending/SimpleAppColor.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppDocumentNo.vue.eta → simpleApp/pending/SimpleAppDocumentNo.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppEditor.vue.eta → simpleApp/pending/SimpleAppEditor.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppInputTable.vue.eta → simpleApp/pending/SimpleAppInputTable.vue} +1 -22
- package/templates/nuxt/components/{SimpleAppList.vue.eta → simpleApp/pending/SimpleAppList.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppListmulti.vue.eta → simpleApp/pending/SimpleAppListmulti.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppNumber.vue.eta → simpleApp/pending/SimpleAppNumber.vue} +12 -1
- package/templates/nuxt/components/{SimpleAppPassword.vue.eta → simpleApp/pending/SimpleAppPassword.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppRadio.vue.eta → simpleApp/pending/SimpleAppRadio.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppRating.vue.eta → simpleApp/pending/SimpleAppRating.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppSelect.vue.eta → simpleApp/pending/SimpleAppSelect.vue} +12 -2
- package/templates/nuxt/components/{SimpleAppSelectmulti.vue.eta → simpleApp/pending/SimpleAppSelectmulti.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppSlider.vue.eta → simpleApp/pending/SimpleAppSlider.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppSwitch.vue.eta → simpleApp/pending/SimpleAppSwitch.vue} +1 -1
- package/templates/nuxt/components/{SimpleAppText.vue.eta → simpleApp/pending/SimpleAppText.vue} +13 -4
- package/templates/nuxt/components/{SimpleAppTextarea.vue.eta → simpleApp/pending/SimpleAppTextarea.vue} +13 -2
- package/templates/nuxt/components/{SimpleAppDatatable.vue.eta → table/TableDocuments.vue.eta} +15 -63
- package/templates/nuxt/components/{UserProfileListItem.vue.eta → user/UserProfileListItem.vue.eta} +1 -1
- package/templates/nuxt/composables/getMenus.generate.ts.eta +4 -1
- package/templates/nuxt/composables/getOpenApi.generate.ts.eta +32 -1
- package/templates/nuxt/composables/goTo.generate.ts.eta +7 -0
- package/templates/nuxt/composables/notifications.generate.ts.eta +1 -1
- package/templates/nuxt/composables/stringHelper.generate.ts.eta +1 -0
- package/templates/nuxt/layouts/default.vue.eta +1 -1
- package/templates/nuxt/layouts/documentlist.vue.eta +24 -8
- package/templates/nuxt/layouts/sidelist.vue.eta +68 -0
- package/templates/nuxt/layouts/sidelistcrud.vue.eta +1 -1
- package/templates/nuxt/nuxt.config.ts.eta +0 -1
- package/templates/nuxt/pages/[xorg]/branch/index.vue.etax +2 -2
- package/templates/nuxt/pages/[xorg]/docnoformat/{[id].vue.eta → [doctype]/[id].vue.eta} +2 -5
- package/templates/nuxt/pages/[xorg]/docnoformat/[doctype]/new.vue.eta +222 -0
- package/templates/nuxt/pages/[xorg]/docnoformat/[doctype].vue.eta +33 -0
- package/templates/nuxt/pages/[xorg]/docnoformat/index.vue.eta +4 -294
- package/templates/nuxt/pages/[xorg]/docnoformat.vue.eta +100 -0
- package/templates/nuxt/pages/[xorg]/organization/[bid].vue.eta +14 -0
- package/templates/nuxt/pages/[xorg]/organization/[id]/branches/[bid].vue +13 -0
- package/templates/nuxt/pages/[xorg]/organization/[id]/branches/new.vue +149 -0
- package/templates/nuxt/pages/[xorg]/organization/[id]/index.vue.eta +1 -0
- package/templates/nuxt/pages/[xorg]/organization/new.vue.eta +151 -0
- package/templates/nuxt/pages/[xorg]/organization.vue.eta +145 -0
- package/templates/nuxt/pages/[xorg]/user/index.vue.eta +23 -23
- package/templates/nuxt/pages/[xorg]/user.vue.eta +13 -11
- package/templates/nuxt/pages/index.vue._eta +2 -2
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +10 -1
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +1 -1
- package/templates/nuxt/types/documentlist.ts.eta +2 -2
- package/templates/nuxt/types/index.ts.eta +2 -1
- package/templates/nuxt/types/simpleappinput.ts.eta +39 -0
- package/templates/project/jsonschemas/category.json._eta +5 -5
- package/templates/project/jsonschemas/customer.json._eta +5 -5
- package/templates/project/jsonschemas/invoice.json._eta +7 -7
- package/templates/project/jsonschemas/product.json._eta +5 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/templates/nuxt/components/ListView.vue.eta +0 -52
- package/templates/nuxt/components/renderers/ForeignKeyRender.vue.eta +0 -10
- package/templates/nuxt/composables/getAutocomplete.generate.ts.eta +0 -32
- package/templates/nuxt/pages/[xorg]/organization/index.vue.eta +0 -168
- /package/templates/nuxt/components/{EventDecision.vue.eta → event/EventDecision.vue.eta} +0 -0
- /package/templates/nuxt/components/{ButtonHome.vue.eta → header/button/HeaderButtonHome.vue.eta} +0 -0
- /package/templates/nuxt/components/{ButtonLogout.vue.eta → header/button/HeaderButtonLogout.vue.eta} +0 -0
- /package/templates/nuxt/components/{ButtonProfile.vue.eta → header/button/HeaderButtonProfile.vue.eta} +0 -0
- /package/templates/nuxt/components/{renderers/BooleanRender.vue.eta → renderer/RendererBoolean.vue.eta} +0 -0
- /package/templates/nuxt/components/{renderers/DateRender.vue.eta → renderer/RendererDate.vue.eta} +0 -0
- /package/templates/nuxt/components/{renderers/MoneyRender.vue.eta → renderer/RendererMoney.vue.eta} +0 -0
- /package/templates/nuxt/components/{renderers/MultiTextRender.vue.eta → renderer/RendererMultiText.vue.eta} +0 -0
- /package/templates/nuxt/components/{SimpleAppDynamicInput.vue.eta → simpleApp/pending/SimpleAppDynamicInput.vue} +0 -0
- /package/templates/nuxt/components/{SimpleAppValue.vue.eta → simpleApp/pending/SimpleAppValue.vue} +0 -0
- /package/templates/nuxt/components/{helper.ts.eta → simpleApp/pending/helper.ts-backup} +0 -0
- /package/templates/nuxt/components/{type.ts.eta → simpleApp/pending/type.ts-backup} +0 -0
- /package/templates/nuxt/components/{CrudNestedDoc.vue.eta → suspended/CrudNestedDoc.vue.eta} +0 -0
- /package/templates/nuxt/components/{CrudSimple.vue.eta → suspended/CrudSimple.vue.eta} +0 -0
- /package/templates/nuxt/components/{Menus.vue.eta → suspended/Menus.vue.eta} +0 -0
- /package/templates/nuxt/components/{Spinner.vue.eta → suspended/Spinner.vue.eta} +0 -0
- /package/templates/nuxt/components/{ButtonCreateTenant.vue.eta → user/UserButtonCreateTenant.vue.eta} +0 -0
- /package/templates/nuxt/components/{ButtonPermissionInfo.vue.eta → user/UserButtonPermissionInfo.vue.eta} +0 -0
- /package/templates/nuxt/components/{Invitation.vue.eta → user/UserInvitation.vue.eta} +0 -0
- /package/templates/nuxt/components/{TenantPicker.vue.eta → user/UserTenantPicker.vue.eta} +0 -0
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
<% const skipcolumns = ['_id','
|
|
1
|
+
<% const skipcolumns = ['_id','createdBy','created','updatedBy','updated','orgId','branchId','tenantId','doctype','docNoFormat'] %>
|
|
2
|
+
<% const getBasicElement = ( inputtype, pathStr, modelValue,subtype=undefined,hidelabel=false,instancepath='') =>
|
|
3
|
+
`<SimpleAppInput :input-type="SimpleAppInputType.${inputtype}" :setting="o.getField('${pathStr}')" v-model="${modelValue}"`+
|
|
4
|
+
(subtype? `type="${subtype}"`:'') +' ' +
|
|
5
|
+
(hidelabel? ':hidelabel="true"':'') +
|
|
6
|
+
(instancepath ? `:instancepath="\`${instancepath}\`"` : '') + '/>' %>
|
|
2
7
|
<script setup lang="ts">
|
|
3
8
|
/**
|
|
4
9
|
* This file was automatically generated by simpleapp everytime regenerate code.
|
|
@@ -7,21 +12,22 @@
|
|
|
7
12
|
* last change 2023-09-09
|
|
8
13
|
* author: Ks Tan
|
|
9
14
|
*/
|
|
15
|
+
import {SimpleAppInputType} from "~/types"
|
|
10
16
|
import ConfirmPopup from 'primevue/confirmpopup';
|
|
11
17
|
import { useConfirm } from "primevue/useconfirm";
|
|
12
18
|
const confirm = useConfirm();
|
|
13
|
-
|
|
19
|
+
const isReadOnly =ref(true)
|
|
14
20
|
const {$<%= it.typename %>Doc,$event } = useNuxtApp();
|
|
15
21
|
const doc = $<%= it.typename %>Doc()
|
|
16
22
|
const data = doc.getReactiveData();
|
|
17
23
|
|
|
18
|
-
const fetchRecord = async (
|
|
19
|
-
await doc.getById(
|
|
24
|
+
const fetchRecord = async (recordid:string) =>{
|
|
25
|
+
await doc.getById(recordid)
|
|
20
26
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
|
|
28
|
+
const id = computed(()=>String(useRoute().params.id??''))
|
|
29
|
+
|
|
30
|
+
|
|
25
31
|
const disabled = computed(()=>{
|
|
26
32
|
return false
|
|
27
33
|
})
|
|
@@ -73,60 +79,74 @@ const newData = ()=>{
|
|
|
73
79
|
const refresh = ()=>{
|
|
74
80
|
$event('RefreshDocumentList',{documentName:doc.getDocName()})
|
|
75
81
|
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if (id.value) {
|
|
85
|
+
fetchRecord(id.value);
|
|
86
|
+
}else{
|
|
87
|
+
isReadOnly.value=false
|
|
88
|
+
}
|
|
76
89
|
</script>
|
|
77
|
-
<template>
|
|
78
|
-
<SimpleAppForm #default="o" :document="doc">
|
|
79
|
-
|
|
90
|
+
<template>
|
|
91
|
+
<SimpleAppForm #default="o" :document="doc" :readonly="isReadOnly">
|
|
92
|
+
<div v-if="isReadOnly" class="w-full">
|
|
93
|
+
<Button
|
|
94
|
+
class="btn btn-primary" @click="isReadOnly=false"
|
|
95
|
+
type="button" >Edit</Button>
|
|
96
|
+
<Button class="" :disabled="disabled" @click="newData" type="button" v-if="canPerform(doc.getDocName(),'create')">New</Button>
|
|
97
|
+
</div>
|
|
98
|
+
<div v-else class="simpleapp-tool-bar col-span-4 text-left gap-4" >
|
|
80
99
|
<Button class="" :disabled="disabled" @click="newData" type="button" v-if="canPerform(doc.getDocName(),'create')">New</Button>
|
|
81
|
-
<Button class="
|
|
82
|
-
<Button class="
|
|
83
|
-
<Button class="
|
|
100
|
+
<Button class="btn btn-primary" :disabled="disabled" @click="createData" type="button" v-if="canPerform(doc.getDocName(),'create') && doc.isNew()">Create</Button>
|
|
101
|
+
<Button class="btn btn-primary" :disabled="disabled" @click="updateData" type="button" v-if="canPerform(doc.getDocName(),'update') && !doc.isNew()">Update</Button>
|
|
102
|
+
<Button class="btn btn-danger" :disabled="disabled" @click="deleteData($event)" type="button" v-if="canPerform(doc.getDocName(),'delete') && !doc.isNew()">Delete</Button>
|
|
84
103
|
|
|
85
104
|
|
|
86
105
|
<ProgressSpinner v-if="disabled==true" style="width: 2rem; height: 2rem" ></ProgressSpinner>
|
|
87
106
|
<ConfirmPopup></ConfirmPopup>
|
|
88
107
|
</div>
|
|
108
|
+
<div class="grid grid-cols-4 gap-4">
|
|
109
|
+
<% let isautofocus='' %>
|
|
89
110
|
<%Object.keys(it.jsonschema.properties).forEach(function(key) { %>
|
|
90
111
|
|
|
91
112
|
<% let obj=it.jsonschema.properties[key] %>
|
|
92
113
|
<% if(skipcolumns.indexOf(key)>=0){ %>
|
|
93
114
|
<% } else if(obj.type=='boolean'){ %>
|
|
94
|
-
|
|
115
|
+
<%~ getBasicElement('checkbox',`#/properties/${key}`,`data.${key}`) %>
|
|
95
116
|
<% } else if(obj.type=='number' || obj.type=='integer'){ %>
|
|
96
|
-
|
|
117
|
+
<%~ getBasicElement('number',`#/properties/${key}`,`data.${key}`) %>
|
|
97
118
|
<% } else if(obj.type=='array' && obj.items && obj.items.type =='string' ){ %>
|
|
98
|
-
|
|
119
|
+
<%~ getBasicElement('chip',`#/properties/${key}`,`data.${key}`) %>
|
|
99
120
|
<% } else if(obj.type=='object' && typeof obj['x-foreignkey']!='undefined'){ %>
|
|
100
|
-
|
|
101
|
-
v-model="data.<%= key %>" optionLabel="label" :remote-src="getAutocomplete('<%=obj['x-foreignkey']%>')"/>
|
|
121
|
+
<%~ getBasicElement('autocomplete',`#/properties/${key}`,`data.${key}`) %>
|
|
102
122
|
<% } else if(obj.type=='string'){ %>
|
|
103
123
|
<% if(obj.format=='documentno'){ %>
|
|
104
|
-
|
|
124
|
+
<%~ getBasicElement('documentno',`#/properties/${key}`,`data.${key}`) %>
|
|
105
125
|
<% }else if(obj.format=='date'){ %>
|
|
106
|
-
|
|
126
|
+
<%~ getBasicElement('date',`#/properties/${key}`,`data.${key}`) %>
|
|
107
127
|
<% } else if(obj.format=='text'){ %>
|
|
108
|
-
|
|
128
|
+
<%~ getBasicElement('textarea',`#/properties/${key}`,`data.${key}`) %>
|
|
109
129
|
<% } else if(obj.format=='html'){ %>
|
|
110
|
-
|
|
130
|
+
<%~ getBasicElement('textarea',`#/properties/${key}`,`data.${key}`) %>
|
|
111
131
|
<% } else if(obj.format=='email'){ %>
|
|
112
|
-
|
|
132
|
+
<%~ getBasicElement('text',`#/properties/${key}`,`data.${key}`,'email') %>
|
|
113
133
|
<% } else if(obj.enum){ %>
|
|
114
|
-
|
|
134
|
+
<%~ getBasicElement('select',`#/properties/${key}`,`data.${key}`) %>
|
|
115
135
|
<% } else if(obj['anyOf']){ %>
|
|
116
136
|
<% for(let f = 0; f < obj['anyOf'].length; f++){ %>
|
|
117
137
|
<%if(obj['anyOf'][f]['format']){ %>
|
|
118
|
-
|
|
138
|
+
<%~ getBasicElement('text',`#/properties/${key}`,`data.${key}`,obj['anyOf'][f]['format']) %>
|
|
119
139
|
<%}%>
|
|
120
140
|
<%}%>
|
|
121
141
|
<% } else if(obj['oneOf']){ %>
|
|
122
142
|
<% for(let f = 0; f < obj['oneOf'].length; f++){ %>
|
|
123
143
|
<%if(obj['oneOf'][f]['format']){ %>
|
|
124
|
-
|
|
144
|
+
<%~ getBasicElement('text',`#/properties/${key}`,`data.${key}`,obj['anyOf'][f]['format']) %>
|
|
125
145
|
<%}%>
|
|
126
146
|
<%}%>
|
|
127
147
|
|
|
128
148
|
<% } else {%>
|
|
129
|
-
|
|
149
|
+
<%~ getBasicElement('text',`#/properties/${key}`,`data.${key}`) %>
|
|
130
150
|
<% }%>
|
|
131
151
|
<% } else if(obj.type=='object' && obj.properties){ %>
|
|
132
152
|
<SimpleAppValue :setting="o.getField('#/properties/<%= key %>')">
|
|
@@ -137,14 +157,13 @@ const refresh = ()=>{
|
|
|
137
157
|
<% let instancePath=`#/${key}/${skey}` %>
|
|
138
158
|
|
|
139
159
|
<% if(sobj.type=='boolean'){ %>
|
|
140
|
-
|
|
160
|
+
<%~ getBasicElement('checkbox',fieldpath,vmodel) %>
|
|
141
161
|
<% } else if(sobj.type=='number' || sobj.type=='integer'){ %>
|
|
142
|
-
|
|
143
|
-
<% } else if(sobj.type=='array' && sobj.items && sobj.items.type =='string' ){ %>
|
|
144
|
-
|
|
162
|
+
<%~ getBasicElement('number',fieldpath,vmodel) %>
|
|
163
|
+
<% } else if(sobj.type=='array' && sobj.items && sobj.items.type =='string' ){ %>
|
|
164
|
+
<%~ getBasicElement('chip',fieldpath,vmodel) %>
|
|
145
165
|
<% } else if(sobj.type=='object' && typeof sobj['x-foreignkey']!='undefined'){ %>
|
|
146
|
-
|
|
147
|
-
v-model="<%= vmodel %>" optionLabel="label" :remote-src="getAutocomplete('<%=sobj['x-foreignkey']%>')"/>
|
|
166
|
+
<%~ getBasicElement('chip',fieldpath,vmodel) %>
|
|
148
167
|
<% } else if(sobj.type=='string'){ %>
|
|
149
168
|
<% if(sobj.format=='date'){ %>
|
|
150
169
|
<SimpleAppText type="<%=sobj.format%>" instancePath="<%=instancePath%>" autofocus :setting="<%~fieldpath%>" v-model="<%= vmodel %>"/>
|
|
@@ -163,63 +182,41 @@ const refresh = ()=>{
|
|
|
163
182
|
<%})%>
|
|
164
183
|
</SimpleAppValue>
|
|
165
184
|
<% } else if(obj.type=='array' && obj.items.type=='object'){%>
|
|
166
|
-
<SimpleAppInputTable
|
|
185
|
+
<SimpleAppInputTable :getField="o.getField" class="col-span-4"
|
|
167
186
|
:setting="o.getField('#/properties/<%=key%>')" v-model="data.<%=key%>">
|
|
168
187
|
<%let tablefields = Object.keys(obj.items.properties) %>
|
|
169
188
|
<% for(let a=0;a<tablefields.length;a++){%>
|
|
170
189
|
<%let col= tablefields[a] %>
|
|
171
190
|
<% if(skipcolumns.includes(col)){ continue}%>
|
|
172
191
|
<%let subobj = obj.items.properties[col] %>
|
|
173
|
-
<
|
|
192
|
+
<Column field="<%=col%>" #body="{index}" :header="camelCaseToWords('<%=col%>')">
|
|
174
193
|
<%if(subobj['x-foreignkey']){%>
|
|
175
|
-
|
|
176
|
-
:setting="o.getField('#/properties/<%=key%>/items/properties/<%=col%>')"
|
|
177
|
-
:remoteSrc="getAutocomplete('<%=subobj[`x-foreignkey`]%>')"
|
|
178
|
-
optionLabel="label"
|
|
179
|
-
:hidelabel="true"
|
|
180
|
-
:instancePath="`/<%=key%>/${index}/<%=col%>`"/>
|
|
194
|
+
<%~ getBasicElement('autocomplete',`#/properties/${key}/items/properties/${col}`,`data.${key}[index].${col}`,undefined,true,`/${key}/\${index}/${col}`) %>
|
|
181
195
|
<% } else if(subobj.type=='boolean'){%>
|
|
182
|
-
|
|
183
|
-
:setting="o.getField('#/properties/<%=key%>/items/properties/<%=col%>')"
|
|
184
|
-
:hidelabel="true"
|
|
185
|
-
:instancePath="`/<%=key%>/${index}/<%=col%>`"/>
|
|
196
|
+
<%~ getBasicElement('checkbox',`#/properties/${key}/items/properties/${col}`,`data.${key}[index].${col}`,undefined,true,`/${key}/\${index}/${col}`) %>
|
|
186
197
|
<% } else if(subobj.type=='number' || subobj.type=='integer'){%>
|
|
187
|
-
|
|
188
|
-
:setting="o.getField('#/properties/<%=key%>/items/properties/<%=col%>')"
|
|
189
|
-
:hidelabel="true"
|
|
190
|
-
:instancePath="`/<%=key%>/${index}/<%=col%>`"/>
|
|
198
|
+
<%~ getBasicElement('number',`#/properties/${key}/items/properties/${col}`,`data.${key}[index].${col}`,undefined,true,`/${key}/\${index}/${col}`) %>
|
|
191
199
|
<%} else if(subobj.type=='string' && subobj.format){%>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
:hidelabel="true"
|
|
196
|
-
:instancePath="`/<%=key%>/${index}/<%=col%>`"/>
|
|
197
|
-
<%} else if(subobj.type=='string' && subobj['enum']){%>
|
|
198
|
-
<SimpleAppSelect v-model="data.<%=key%>[index].<%=col%>"
|
|
199
|
-
:setting="o.getField('#/properties/<%=key%>/items/properties/<%=col%>')"
|
|
200
|
-
:hidelabel="true"
|
|
201
|
-
:instancePath="`/<%=key%>/${index}/<%=col%>`"/>
|
|
200
|
+
<%~ getBasicElement('number',`#/properties/${key}/items/properties/${col}`,`data.${key}[index].${col}`,subobj.format,true,`/${key}/\${index}/${col}`) %>
|
|
201
|
+
<%} else if(subobj.type=='string' && subobj['enum']){%>
|
|
202
|
+
<%~ getBasicElement('select',`#/properties/${key}/items/properties/${col}`,`data.${key}[index].${col}`,undefined,true,`/${key}/\${index}/${col}`) %>
|
|
202
203
|
<%} else if(subobj.type=='string' ){%>
|
|
203
|
-
|
|
204
|
-
:setting="o.getField('#/properties/<%=key%>/items/properties/<%=col%>')"
|
|
205
|
-
:hidelabel="true"
|
|
206
|
-
:instancePath="`/<%=key%>/${index}/<%=col%>`"/>
|
|
204
|
+
<%~ getBasicElement('text',`#/properties/${key}/items/properties/${col}`,`data.${key}[index].${col}`,undefined,true,`/${key}/\${index}/${col}`) %>
|
|
207
205
|
<%} else if(subobj.type=='number'){%>
|
|
208
|
-
|
|
209
|
-
:setting="o.getField('#/properties/<%=key%>/items/properties/<%=col%>')"
|
|
210
|
-
:hidelabel="true"
|
|
211
|
-
:instancePath="`/<%=key%>/${index}/<%=col%>`"/>
|
|
206
|
+
<%~ getBasicElement('number',`#/properties/${key}/items/properties/${col}`,`data.${key}[index].${col}`,undefined,true,`/${key}/\${index}/${col}`) %>
|
|
212
207
|
<%}%>
|
|
213
|
-
</
|
|
208
|
+
</Column>
|
|
214
209
|
<%}%>
|
|
215
|
-
<
|
|
210
|
+
<Column #body="{index}" header="Delete">
|
|
216
211
|
<Button class="btn-danger" type="button" @click="data.<%=key%>.splice(index,1)">X</Button>
|
|
217
|
-
</
|
|
212
|
+
</Column>
|
|
218
213
|
</SimpleAppInputTable>
|
|
219
214
|
<% } else{%>
|
|
220
215
|
<!-- Can auto generate <%=obj.key %> -->
|
|
221
216
|
<!-- <%~ JSON.stringify(obj) %>-->
|
|
222
217
|
<%}%>
|
|
223
218
|
<%})%>
|
|
219
|
+
</div>
|
|
224
220
|
</SimpleAppForm>
|
|
221
|
+
<DebugDocumentData v-model="data"/>
|
|
225
222
|
</template>
|
|
@@ -104,8 +104,8 @@ export class <%= it.typename%>Client extends SimpleAppClient<<%= it.typename%>,<
|
|
|
104
104
|
|
|
105
105
|
<%for(let i=0;i<it.apiSettings.length;i++){%>
|
|
106
106
|
<% let api = it.apiSettings[i] %>
|
|
107
|
-
async <%=api.action%>(<% if(api.
|
|
108
|
-
<%let subpath = api.
|
|
107
|
+
async <%=api.action%>(<% if(api.entryPoint && api.entryPoint.includes(':')) {%>
|
|
108
|
+
<%let subpath = api.entryPoint.split('/')%>
|
|
109
109
|
<% for(let a=0;a<subpath.length;a++){%>
|
|
110
110
|
<%const partstr = subpath[a]%>
|
|
111
111
|
<%if(partstr.includes(':')){%>
|
|
@@ -116,8 +116,8 @@ export class <%= it.typename%>Client extends SimpleAppClient<<%= it.typename%>,<
|
|
|
116
116
|
<%}%>){
|
|
117
117
|
//const recordid: string = this.data.value._id ?? '';
|
|
118
118
|
return await this.docapi.<%=api.action%>(
|
|
119
|
-
<% if(api.
|
|
120
|
-
<%let subpath = api.
|
|
119
|
+
<% if(api.entryPoint && api.entryPoint.includes(':')) {%>
|
|
120
|
+
<%let subpath = api.entryPoint.split('/')%>
|
|
121
121
|
<% for(let a=0;a<subpath.length;a++){%>
|
|
122
122
|
<%const partstr = subpath[a]%>
|
|
123
123
|
<%if(partstr.includes(':')){%>
|
|
@@ -140,7 +140,7 @@ export class <%= it.typename%>Client extends SimpleAppClient<<%= it.typename%>,<
|
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
reCalculateValue(){
|
|
143
|
-
console.log('trigger new recalculate')
|
|
143
|
+
//console.log('trigger new recalculate')
|
|
144
144
|
const data = this.getData()
|
|
145
145
|
|
|
146
146
|
<% if(it.jsonschema['x-simpleapp-config']['formulas']){ %>
|
|
@@ -149,7 +149,7 @@ export class <%= it.typename%>Client extends SimpleAppClient<<%= it.typename%>,<
|
|
|
149
149
|
// <%~ JSON.stringify(fml) %>
|
|
150
150
|
//const tmp = jsonpath.query(vdata,fieldpath).filter((item:string)=>item!='')
|
|
151
151
|
|
|
152
|
-
jsonpath.apply(data, '<%~ fml.
|
|
152
|
+
jsonpath.apply(data, '<%~ fml.jsonPath %>', function(value) { return <%~fml.formula %> });
|
|
153
153
|
|
|
154
154
|
<%}) %>
|
|
155
155
|
<%} %>
|
|
@@ -34,6 +34,8 @@ export class UserContext {
|
|
|
34
34
|
protected xOrg: string = '';
|
|
35
35
|
protected tenantId: number = 0;
|
|
36
36
|
protected orgId: number = 0;
|
|
37
|
+
protected orgRecordId:string = ''
|
|
38
|
+
protected branchRecordId:string = ''
|
|
37
39
|
protected branchId: number = 0;
|
|
38
40
|
protected ssoACL: any = {};
|
|
39
41
|
protected token: string = '';
|
|
@@ -157,14 +159,18 @@ export class UserContext {
|
|
|
157
159
|
if(users && users.length>0){
|
|
158
160
|
const userinfo = users[0]
|
|
159
161
|
|
|
160
|
-
|
|
162
|
+
console.log(userinfo)
|
|
161
163
|
if(this.tenantId>0){
|
|
162
164
|
const myperm=userinfo.permissions[0]
|
|
165
|
+
|
|
163
166
|
if(myperm && myperm.group){
|
|
164
167
|
userinfo.group = myperm.group
|
|
165
168
|
userinfo.roles = rolegroups[userinfo.group]()
|
|
169
|
+
|
|
170
|
+
userinfo.branchRecordId = myperm.currentbranch[0].branchRecordId
|
|
166
171
|
userinfo.branchCode = myperm.currentbranch[0].branchCode
|
|
167
172
|
userinfo.branchName = myperm.currentbranch[0].branchName
|
|
173
|
+
userinfo.orgRecordId = myperm.currentorg[0]._id
|
|
168
174
|
userinfo.orgCode = myperm.currentorg[0].orgCode
|
|
169
175
|
userinfo.orgName = myperm.currentorg[0].orgName
|
|
170
176
|
|
|
@@ -181,11 +187,11 @@ export class UserContext {
|
|
|
181
187
|
|
|
182
188
|
|
|
183
189
|
//update last activtity dont too frequent
|
|
184
|
-
if(!dblastactivity || currentitme - lastvisit > 5000 ){
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
190
|
+
//if(!dblastactivity || currentitme - lastvisit > 5000 ){
|
|
191
|
+
// const newusermodel = await this.usermodel.findById(userinfo._id)
|
|
192
|
+
// newusermodel.lastActivity= this.lastActivity
|
|
193
|
+
// const result = await newusermodel.save()
|
|
194
|
+
//}
|
|
189
195
|
|
|
190
196
|
// const result = await this.usermodel.findOneAndUpdate({_id: userinfo._id},{lastActivity: new Date().toISOString})
|
|
191
197
|
return userinfo
|
|
@@ -217,6 +223,8 @@ export class UserContext {
|
|
|
217
223
|
this.branchName = userinfo['branchName'] ?? ''
|
|
218
224
|
this.orgCode = userinfo['orgCode'] ?? ''
|
|
219
225
|
this.orgName = userinfo['orgName'] ?? ''
|
|
226
|
+
this.orgRecordId = userinfo['orgRecordId'] ?? ''
|
|
227
|
+
this.branchRecordId = userinfo['branchRecordId'] ?? ''
|
|
220
228
|
this.group = userinfo['group'] ?? ''
|
|
221
229
|
this.roles = userinfo['roles'] ?? [Role.Everyone,Role.User]
|
|
222
230
|
}else{
|
|
@@ -271,8 +279,8 @@ export class UserContext {
|
|
|
271
279
|
tenantId: u.tenantId,
|
|
272
280
|
orgId: u.orgId,
|
|
273
281
|
branchId: u.branchId,
|
|
274
|
-
|
|
275
|
-
|
|
282
|
+
createdBy: u.uid,
|
|
283
|
+
updatedBy: u.uid,
|
|
276
284
|
created: new Date().toISOString(),
|
|
277
285
|
updated: new Date().toISOString()
|
|
278
286
|
};
|
|
@@ -280,7 +288,7 @@ export class UserContext {
|
|
|
280
288
|
getUpdateFilter = () => {
|
|
281
289
|
const u = this;
|
|
282
290
|
return {
|
|
283
|
-
|
|
291
|
+
updatedBy: u.uid,
|
|
284
292
|
updated: new Date().toISOString()
|
|
285
293
|
};
|
|
286
294
|
};
|
|
@@ -312,6 +320,8 @@ export class UserContext {
|
|
|
312
320
|
sessionId:this.sessionId,
|
|
313
321
|
tenantId: this.getTenantId(),
|
|
314
322
|
orgId: this.getOrgId(),
|
|
323
|
+
orgRecordId: this.orgRecordId ,
|
|
324
|
+
branchRecordId: this.branchRecordId,
|
|
315
325
|
branchId: this.getBranchId(),
|
|
316
326
|
branchCode: this.branchCode,
|
|
317
327
|
branchName: this.branchName,
|
|
@@ -386,7 +396,7 @@ export class UserContext {
|
|
|
386
396
|
// console.log("find invitation:",res)
|
|
387
397
|
if(!res.uid){
|
|
388
398
|
res.uid = this.getUid()
|
|
389
|
-
res.
|
|
399
|
+
res.fullName = this.fullname
|
|
390
400
|
res.active = true
|
|
391
401
|
|
|
392
402
|
if(decision=='accept'){
|
|
@@ -166,7 +166,6 @@ export class SimpleAppService<T extends { _id?: string }> {
|
|
|
166
166
|
|
|
167
167
|
Object.assign(filterobj, this.getIsolationFilter(appuser));
|
|
168
168
|
let projections = {
|
|
169
|
-
id: `\$_id`,
|
|
170
169
|
label: `\$${this.documentIdentityLabel}`,
|
|
171
170
|
code: `\$${this.documentIdentityCode}`,
|
|
172
171
|
};
|
|
@@ -215,7 +214,7 @@ export class SimpleAppService<T extends { _id?: string }> {
|
|
|
215
214
|
|
|
216
215
|
|
|
217
216
|
Object.assign(pipeline[0]['$match'],isolationFilter);
|
|
218
|
-
console.log("final agg",pipeline)
|
|
217
|
+
//console.log("final agg",pipeline)
|
|
219
218
|
return await this.doc.aggregate(pipeline)
|
|
220
219
|
}catch(err){
|
|
221
220
|
throw new InternalServerErrorException(err);
|
|
@@ -330,12 +329,12 @@ export class SimpleAppService<T extends { _id?: string }> {
|
|
|
330
329
|
}
|
|
331
330
|
}else if(key == 'created'){
|
|
332
331
|
data['created'] = (transtype == 'create' || !data['created']) ? new Date() .toISOString() : data['created']
|
|
333
|
-
}else if(key == '
|
|
334
|
-
data['
|
|
332
|
+
}else if(key == 'createdBy'){
|
|
333
|
+
data['createdBy'] = (transtype == 'create' || !data['createdBy']) ? appuser.getUid() : data['createdBy']
|
|
335
334
|
}else if(key == 'updated'){
|
|
336
335
|
data['updated'] = new Date() .toISOString()
|
|
337
|
-
}else if(key == '
|
|
338
|
-
data['
|
|
336
|
+
}else if(key == 'updatedBy'){
|
|
337
|
+
data['updatedBy'] = appuser.getUid()
|
|
339
338
|
}
|
|
340
339
|
}
|
|
341
340
|
|
|
@@ -422,7 +421,7 @@ export class SimpleAppService<T extends { _id?: string }> {
|
|
|
422
421
|
await this.hook(appuser,HookType.beforeDelete, id);
|
|
423
422
|
this.logger.debug('delete record',this.documentName, id);
|
|
424
423
|
dependency = await this.getRelatedRecords(id);
|
|
425
|
-
console.log('dependency', dependency);
|
|
424
|
+
//console.log('dependency', dependency);
|
|
426
425
|
if (!dependency) {
|
|
427
426
|
let filterIsolation = this.getIsolationFilter(appuser);
|
|
428
427
|
this.polishIsolationFilter(filterIsolation)
|
|
@@ -440,7 +439,7 @@ export class SimpleAppService<T extends { _id?: string }> {
|
|
|
440
439
|
//this.doc.findByIdAndDelete(id);
|
|
441
440
|
return deleteresult;
|
|
442
441
|
} else {
|
|
443
|
-
console.log("reject query",dependency)
|
|
442
|
+
//console.log("reject query",dependency)
|
|
444
443
|
|
|
445
444
|
throw new ForbiddenException('Foreignkey constraint',dependency)
|
|
446
445
|
}
|
|
@@ -609,7 +608,7 @@ export class SimpleAppService<T extends { _id?: string }> {
|
|
|
609
608
|
}
|
|
610
609
|
|
|
611
610
|
keystore[collectionname]= results
|
|
612
|
-
console.log("keystorekeystore",keystore)
|
|
611
|
+
//console.log("keystorekeystore",keystore)
|
|
613
612
|
let addfield={$addFields:{collection:collectionname}}
|
|
614
613
|
|
|
615
614
|
const stagefilter:PipelineStage = {
|
|
@@ -146,7 +146,7 @@ export class ProfileService {
|
|
|
146
146
|
orgId: orgResult.orgId,
|
|
147
147
|
branchId: branchResult.branchId,
|
|
148
148
|
uid: appuser.getUid(),
|
|
149
|
-
|
|
149
|
+
fullName: appuser.getFullname(),
|
|
150
150
|
email: appuser.getEmail(),
|
|
151
151
|
active: true,
|
|
152
152
|
};
|
|
@@ -176,13 +176,22 @@ export class ProfileService {
|
|
|
176
176
|
|
|
177
177
|
this.logger.log(permResult, 'create Permission result');
|
|
178
178
|
|
|
179
|
-
|
|
180
179
|
//tenant owner shall map to userId for that tenant
|
|
181
|
-
|
|
182
|
-
const tenantUpdateData = await this.tenantsvc.findById(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
|
|
181
|
+
const tenantUpdateData = await this.tenantsvc.findById(
|
|
182
|
+
appuser,
|
|
183
|
+
tenantResult._id,
|
|
184
|
+
);
|
|
185
|
+
this.logger.log(
|
|
186
|
+
tenantUpdateData,
|
|
187
|
+
`update tenant owner(${tenantResult._id})`,
|
|
188
|
+
);
|
|
189
|
+
tenantUpdateData.owner._id = userRecordId;
|
|
190
|
+
const updateTenantOwnerResult = await this.tenantsvc.findIdThenUpdate(
|
|
191
|
+
appuser,
|
|
192
|
+
tenantResult._id,
|
|
193
|
+
tenantUpdateData,
|
|
194
|
+
);
|
|
186
195
|
if (!updateTenantOwnerResult) {
|
|
187
196
|
throw new BadRequestException('Update tenant owner failed');
|
|
188
197
|
}
|
|
@@ -15,9 +15,7 @@ export { Autoincreament } from '../generate/types/autoinc.type';
|
|
|
15
15
|
|
|
16
16
|
@Injectable()
|
|
17
17
|
export class AutoincreamentService extends AutoincreamentProcessor {
|
|
18
|
-
constructor(
|
|
19
|
-
@InjectModel('Autoincreament') mydoc: Model<Autoincreament>,
|
|
20
|
-
) {
|
|
18
|
+
constructor(@InjectModel('Autoincreament') mydoc: Model<Autoincreament>) {
|
|
21
19
|
super(mydoc);
|
|
22
20
|
}
|
|
23
21
|
|
|
@@ -69,18 +67,23 @@ export class AutoincreamentService extends AutoincreamentProcessor {
|
|
|
69
67
|
if (res.length > 0) {
|
|
70
68
|
// console.log("FOUND RESULT------")
|
|
71
69
|
const tmp = res[0];
|
|
72
|
-
const nextno = tmp.
|
|
70
|
+
const nextno = tmp.nextNo;
|
|
73
71
|
data = { collectionName: collection, fieldName: field, nextno: nextno };
|
|
74
72
|
this.findIdThenUpdate(appuser, tmp._id, {
|
|
75
73
|
collectionName: collection,
|
|
76
74
|
fieldName: field,
|
|
77
|
-
|
|
75
|
+
nextNo: tmp.nextNo + 1,
|
|
78
76
|
});
|
|
79
77
|
} else {
|
|
80
78
|
// console.log("CREATE ROW------")
|
|
81
|
-
this.data = { collectionName: collection, fieldName: field,
|
|
79
|
+
this.data = { collectionName: collection, fieldName: field, nextNo: 2 };
|
|
82
80
|
const createResult = await this.create(appuser, this.data);
|
|
83
|
-
data = {
|
|
81
|
+
data = {
|
|
82
|
+
_id: crypto.randomUUID(),
|
|
83
|
+
collectionName: collection,
|
|
84
|
+
fieldName: field,
|
|
85
|
+
nextno: 1,
|
|
86
|
+
};
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
return data;
|
|
@@ -80,8 +80,8 @@ export class BranchService extends BranchProcessor {
|
|
|
80
80
|
const pattern = `${doc.docType}-${branchCode}-[00000]`;
|
|
81
81
|
const formatdata: Docnoformat = {
|
|
82
82
|
_id: crypto.randomUUID(),
|
|
83
|
-
docNoFormatNo: doc.docType
|
|
84
|
-
docNoFormatName: `Default ${doc.docType}`,
|
|
83
|
+
docNoFormatNo: `${doc.docType}-${branchCode}`,
|
|
84
|
+
docNoFormatName: `Default ${doc.docType} - ${branchCode}`,
|
|
85
85
|
docNoType: doc.docType,
|
|
86
86
|
docNoPattern: pattern,
|
|
87
87
|
branch: { _id: recordId, branchId: branchId, label: branchName },
|
|
@@ -1,3 +1,35 @@
|
|
|
1
1
|
.router-link-exact-active{
|
|
2
2
|
@apply bg-primary-100 block
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[data-pc-group-section=pagebutton]{
|
|
7
|
+
@apply p-2 m-0 rounded-none border
|
|
8
|
+
}
|
|
9
|
+
[data-pc-section=pagebutton]{
|
|
10
|
+
@apply p-3 m-0 border
|
|
11
|
+
}
|
|
12
|
+
.btn {
|
|
13
|
+
@apply font-medium
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.btn-primary {
|
|
17
|
+
@apply bg-primary-600 hover:bg-primary-400 text-white
|
|
18
|
+
}
|
|
19
|
+
.btn-secondary {
|
|
20
|
+
@apply bg-secondary-600 hover:bg-secondary-400 text-white
|
|
21
|
+
}
|
|
22
|
+
.btn-danger {
|
|
23
|
+
@apply bg-danger-600 hover:bg-danger-400 text-white
|
|
24
|
+
}
|
|
25
|
+
.btn-warn {
|
|
26
|
+
@apply bg-warning-600 hover:bg-warning-400 text-white
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[disabled] ,[readonly]{
|
|
30
|
+
@apply bg-gray-300
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[aria-selected=true]{
|
|
34
|
+
@apply bg-primary-100
|
|
3
35
|
}
|
|
@@ -5,7 +5,7 @@ import Tailwind from "primevue/passthrough/tailwind";
|
|
|
5
5
|
const CustomTailwind = usePassThrough(
|
|
6
6
|
Tailwind,
|
|
7
7
|
{
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
toast:{
|
|
10
10
|
root:{ class:'w-1/3 '},
|
|
11
11
|
message:{},
|
|
@@ -23,7 +23,14 @@ const CustomTailwind = usePassThrough(
|
|
|
23
23
|
label:{class: 'text-sm'},
|
|
24
24
|
},
|
|
25
25
|
button:{root:{class: 'focus:outline-none transition duration-150 ease-in-out rounded px-8 py-2 m-1 border'}},
|
|
26
|
-
dialog:{root:{class:['border p-2']}},
|
|
26
|
+
dialog:{root:{class:['border p-2']}},
|
|
27
|
+
autocomplete:{
|
|
28
|
+
input:{class:'m-0 font-sans text-gray-600 dark:text-white/80 bg-white dark:bg-gray-900 border border-gray-300 dark:border-blue-900/40 rounded-lg rounded-tr-none rounded-br-none transition-colors duration-200 appearance-none hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)] p-3 text-base flex-1'},
|
|
29
|
+
loadingIcon:{class:'animate-spin mt-4 -ml-6 mr-2'},
|
|
30
|
+
dropdownbutton: {
|
|
31
|
+
root:' bg-primary-600 hover:bg-primary-400 text-white rounded flex flex-row p-3 -ml-6 rounded-tl-none rounded-bl-none '
|
|
32
|
+
}
|
|
33
|
+
},
|
|
27
34
|
sidebar:{
|
|
28
35
|
root:{class:'w-1/2 bg-white border p-2 h-full'}
|
|
29
36
|
},
|