@simitgroup/simpleapp-generator 1.2.5 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simitgroup/simpleapp-generator",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "frontend nuxtjs and backend nests code generator using jsonschema",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -30,7 +30,7 @@ const CustomTailwind = usePassThrough(
30
30
  label:{class: 'text-sm'},
31
31
  },
32
32
  button:{root:{class: 'focus:outline-none transition duration-150 ease-in-out rounded p-2 m-1 border dark:border-gray-600'}},
33
- dialog:{root:{class:['border p-2']}},
33
+ dialog:{root:{class:['border p-2 h-4/5']}},
34
34
  autocomplete:{
35
35
  root:{class:'border border-gray-300 dark:!border-blue-900/40 rounded-lg flex flex-row'},
36
36
  input:{class:'w-full p-2 font-sans 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)] text-base'},
@@ -97,12 +97,9 @@ const getListFromAutocompleteApi = (event:any)=>{
97
97
 
98
98
  //on select
99
99
  const pickAutoComplete = (event:any)=>{
100
- console.log("event",event,'event.value._id',"'"+event.value._id+"'")
101
- if(event.value._id===''){
102
-
100
+ if(event.value._id===''){
103
101
  modelValue.value = emptyautocomplete.value
104
102
  autocompleteitem.value = emptyautocomplete.value
105
- console.log(modelValue.value )
106
103
  } else if(event.value._id==='new'){
107
104
 
108
105
  modelValue.value = emptyautocomplete.value
@@ -28,7 +28,7 @@
28
28
  <!-- time component -->
29
29
  <Calendar :pt="pt"
30
30
  v-else-if="inputType == SimpleAppInputType.time" timeOnly showTime
31
- :hourFormat="componentProps && componentProps['hourFormat']? componentProps['hourFormat']: 12"
31
+ hourFormat="12"
32
32
  @update:modelValue="updateTime"
33
33
  :inputId="slotprops.uuid" :path="setting.instancepath"
34
34
  v-model="(modelValue as string)" :readonly="isReadonly"
@@ -172,10 +172,9 @@ import Slider,{ SliderProps } from 'primevue/slider';
172
172
  import Textarea, { TextareaProps } from 'primevue/textarea';
173
173
  import {SimpleAppInputType} from '~/types'
174
174
 
175
- const datevalue = ref('')
176
175
  const modelValue = defineModel()
177
- const timestr = `${today()}T${modelValue.value??'00:00:00Z'}`
178
- const timevalue = ref<Date>(moment(timestr).toDate())
176
+ const datevalue = ref('')
177
+ const timevalue = ref<Date>()
179
178
 
180
179
  const props = withDefaults( defineProps<{
181
180
  inputType:SimpleAppInputType,
@@ -15,7 +15,7 @@ export const getAvatarLink = (email:string, size:number):string=>{
15
15
  }
16
16
 
17
17
  export const toLocalDate = (dateiso8601:string)=> new Date(String(dateiso8601)).toLocaleDateString()
18
- export const t = (txt:string,options?:any):string => useNuxtApp().$i18n.t(txt,options)
18
+ export const t = (txt:string,options?:any):string => !txt || txt.trim()=='' ? '' : useNuxtApp().$i18n.t(txt,options)
19
19
  export const today = () => moment().format('YYYY-MM-DD')
20
20
  export const dateToString = (date:Date) => moment(date).format('YYYY-MM-DD')
21
21
  export const getMoment = (startTime:string)=> moment(startTime)
@@ -91,11 +91,11 @@ export class SimpleAppClient<
91
91
  .then((res: AxiosResponse) => {
92
92
  // if(this.event){this.event('success:create',res.data);return res.data}
93
93
  // console.log(this.getDocName(), "ok")
94
- $event('Notification',{
95
- documentName:this.getDocName(),
96
- summary:'Record create successfully',
97
- status:NotificationStatus.success
98
- })
94
+ // $event('Notification',{
95
+ // documentName:this.getDocName(),
96
+ // summary:'Record create successfully',
97
+ // status:NotificationStatus.success
98
+ // })
99
99
  this.data.value = { ...res.data };
100
100
  return res;
101
101
  }).catch((errors:any)=>{
@@ -131,12 +131,12 @@ export class SimpleAppClient<
131
131
  .runUpdate(recordid, this.data.value,{timeout:this.defaultTimeOut})
132
132
  .then((res: AxiosResponse) => {
133
133
  // if(this.event){this.event('success:update',res.data)}
134
- $event('Notification',{
135
- documentName:this.getDocName(),
136
- summary:'Record update success',
137
- status:NotificationStatus.success,
138
- data:errors
139
- })
134
+ // $event('Notification',{
135
+ // documentName:this.getDocName(),
136
+ // summary:'Record update success',
137
+ // status:NotificationStatus.success,
138
+ // data:errors
139
+ // })
140
140
  this.data.value = res.data
141
141
  return res.data;
142
142
  }).catch((errors:any)=>{
@@ -162,12 +162,12 @@ export class SimpleAppClient<
162
162
  return await this.docapi.runDelete(id,{timeout:this.defaultTimeOut})
163
163
  .then((res:AxiosResponse)=>{
164
164
  // if(this.event){this.event('success:delete',res.data)}
165
- $event('Notification',{
166
- documentName:this.getDocName(),
167
- summary:'Record deleted successfully',
168
- status:NotificationStatus.success,
169
- data:res.data
170
- })
165
+ // $event('Notification',{
166
+ // documentName:this.getDocName(),
167
+ // summary:'Record deleted successfully',
168
+ // status:NotificationStatus.success,
169
+ // data:res.data
170
+ // })
171
171
  return Promise.resolve(res.data)
172
172
  }).catch((errors:any)=>{
173
173
  // if(this.event){this.event('error:delete',errors.response.data.data)}