Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ReleaseNote.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
[2.0.2o-alpha]

1. Revert date.generate.ts for universal use
2. Adjust SimpleAppInput add paras on autocomplete

[2.0.2n-alpha]

1. Fix generated code eslint error

[2.0.2m-alpha]

1. Change date format follow DD/MM/YYYY instead of user laptop
2. Define isBillingUser, isInternalUser and isDevSupport for easy to called role
3. Add escapeRegExp for search student list

[2.0.2l-alpha]

1. Add direct debit mini api scope
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@simitgroup/simpleapp-generator",
"version": "2.0.2n-alpha",
"version": "2.0.2o-alpha",
"description": "frontend nuxtjs and backend nests code generator using jsonschema.",
"main": "dist/index.js",
"scripts": {
Expand Down
10 changes: 6 additions & 4 deletions templates/nuxt/app.vue.eta
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<EventDocumentViewer></EventDocumentViewer>
<EventDecision/>
<EventNotification/>
<SubscriptionExpirationWarning/>
<SubscriptionFreeBanner/>
<NuxtPage/>
</NuxtLayout>
</template>
Expand All @@ -29,9 +31,9 @@ watch(()=>useRoute().fullPath,async (newval,oldvalue)=>{
if(getPathPara('xorg','')!=''){

if(getCurrentXorg()===''){
navigateTo('/picktenant')
goTo('/picktenant')
}else if(!getUserProfile()?.currentGroup){
goTo('pickgroup')
navigateTo('pickgroup')
}
setGraphqlServer()
}
Expand All @@ -54,9 +56,9 @@ onMounted(async()=>{
const currentgroup = useCookie('currentGroup').value
//if no xorg, no enforce pick group
if(getCurrentXorg()===''){
navigateTo('/picktenant')
goTo('/picktenant')
}else if(!currentgroup){
goTo('/pickgroup')
navigateTo('/pickgroup')
}
setGraphqlServer()
}else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
getDocument(setting.fieldsetting['x-foreignkey']).viewer,
)
"
:paras="props.paras"
@after="
async (eventType: FormCrudEvent, data: any, result: any) =>
await afterRenderMobileForm(eventType, data)
Expand Down Expand Up @@ -206,6 +207,7 @@ const props = withDefaults(
componentProps?: AutoCompleteProps;
autocompleteFilter?: any;
pt?: any;
paras?: any;
}>(),
{
allowAddNew: true,
Expand Down Expand Up @@ -358,6 +360,7 @@ const openViewer = (readonly: boolean) => {
readonly: readonly,
viewer: getDocument(docname)?.viewer,
documentName: docname,
paras: props.paras,

//after create, auto copy value into auto complete
after: async (eventType: FormCrudEvent, data: any) => {
Expand Down
4 changes: 3 additions & 1 deletion templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
:readonly="isReadonly"
:placeholder="placeholder"
:autocomplete-filter="autocompleteFilter"
:paras="paras"
@change="onChange"
>
<template #header>
Expand Down Expand Up @@ -419,13 +420,14 @@ const props = withDefaults(
setting: any;
type?: string;
instancepath?: string;
options?: string[];
options?: string[] | Array<{ value: string; label: string }>;
hidelabel?: boolean;
readonly?: boolean;
autofocus?: boolean;
pt?: any;
placeholder?: string;
autocompleteFilter?: any;
paras?: any;
componentProps?:
| InputNumberProps
| InputSwitchProps
Expand Down
11 changes: 11 additions & 0 deletions templates/nuxt/plugins/20.simpleapp-userstore.ts.eta
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,17 @@ export default defineNuxtPlugin(async (nuxtApp) => {
isExecutive() {
return this.currentGroup == "executive";
},
isBillingUser() {
const roles = this.roles;
return roles.includes("tenantowner") || roles.includes("billing") || roles.includes("superadmin") || roles.includes("devbilling") || roles.includes("devsupport");
},
isInternalUser() {
const roles = this.roles;
return roles.includes("superadmin") || roles.includes("devbilling") || roles.includes("devsupport");
},
isDevSupport() {
return this.roles.includes("devsupport");
},
},
});

Expand Down