@simitgroup/simpleapp-generator 1.0.48 → 1.0.50

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.md CHANGED
@@ -33,9 +33,10 @@ docker network create mongoCluster
33
33
  #prepare node1
34
34
  docker run -d -p 27017:27017 --name mongo1 --network mongoCluster mongo:6 mongod --replSet myReplicaSet --bind_ip localhost,mongo1
35
35
  #prepare node2
36
- docker run -d --rm -p 27018:27017 --name mongo2 --network mongoCluster mongo:6 mongod --replSet myReplicaSet --bind_ip localhost,mongo2
36
+ docker run -d -p 27018:27017 --name mongo2 --network mongoCluster mongo:6 mongod --replSet myReplicaSet --bind_ip localhost,mongo2
37
37
  #prepare node3
38
- docker run -d --rm -p 27019:27017 --name mongo3 --network mongoCluster mongo:6 mongod --replSet myReplicaSet --bind_ip localhost,mongo3
38
+ docker run -d -p 27019:27017 --name mongo3 --network mongoCluster mongo:6 mongod --replSet myReplicaSet --bind_ip localhost,mongo3
39
+
39
40
 
40
41
  # build cluster
41
42
  docker exec -it mongo1 mongosh --eval "rs.initiate({
@@ -48,17 +49,22 @@ docker exec -it mongo1 mongosh --eval "rs.initiate({
48
49
  })"
49
50
 
50
51
  # set mongod1 high priority as primary server
51
- docker exec -it mongo` mongosh --eval "cfg = rs.conf()
52
+ docker exec -it mongo1 ` mongosh --eval "cfg = rs.conf()
52
53
  cfg.members[0].priority = 50
53
54
  cfg.members[1].priority = 1
54
55
  cfg.members[2].priority = 1
55
- rs.reconfig(cfg)"
56
+ rs.reconfig(cfg)"`
56
57
 
57
58
  #check cluster status
58
59
  docker exec -it mongo1 mongosh --eval "rs.status()"
59
60
 
60
61
  ```
61
62
 
63
+ ** you may need to append below code into your `/etc/hosts`
64
+ ```
65
+ 127.0.0.1 mongo1 mongo2 mongo3
66
+ ```
67
+
62
68
 
63
69
 
64
70
  2. create project folder
@@ -97,7 +103,7 @@ sh build.sh frontend
97
103
  10. start frontend:
98
104
  ```sh
99
105
  cd ~/project1/frontend
100
- pnpm start
106
+ pnpm dev
101
107
  ```
102
108
 
103
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simitgroup/simpleapp-generator",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "frontend nuxtjs and backend nests code generator using jsonschema",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -7,7 +7,7 @@
7
7
  * author: Ks Tan
8
8
  */
9
9
  <% let skipcolumns = ['_id','createdby','created','updatedby','updated','orgId','branchId','tenantId','doctype'] %>
10
- import {InputTableColumnType,InputTableColumn} from "@simitgroup/simpleapp-vue-component/src/type";
10
+ import {InputTableColumnType,InputTableColumn} from "~/components/type";
11
11
  import Column from "primevue/column";
12
12
  const {$<%= it.typename %>Doc } = useNuxtApp();
13
13
  const doc = $<%= it.typename %>Doc()
@@ -27,7 +27,7 @@ const visibletenant = ref(false)
27
27
  <MenuIndex></MenuIndex>
28
28
  </Dialog>
29
29
  <Dialog v-model:visible="visibletenant" modal header="Pick Tenant" :autoZIndex="false" :style="{zIndex:100, width: '80vw' }">
30
- <XorgPicker></XorgPicker>
30
+
31
31
  </Dialog>
32
32
 
33
33
  <div class="flex-1">
@@ -32,7 +32,7 @@ import AutoComplete from 'primevue/autocomplete';
32
32
  import FieldContainer from './SimpleFieldContainer.vue'
33
33
  import {prepareList} from './helper'
34
34
  import type {SimpleAppFieldSetting,ListOptionType} from './type'
35
- import { SimpleAppClient } from '../generate/docs/SimpleAppClient' //'../SimpleAppClient';
35
+ import { SimpleAppClient } from '../simpleapp/generate/clients/SimpleAppClient'
36
36
  import type { JSONSchema7 } from 'json-schema';
37
37
 
38
38
  type autocompletetype={[key:string]:any}
@@ -6,7 +6,7 @@
6
6
  </template>
7
7
  <script setup lang="ts" >
8
8
  import type {SimpleAppFieldSetting} from './type'
9
- import { SimpleAppClient } from '../generate/docs/SimpleAppClient' //'../SimpleAppClient';
9
+ import { SimpleAppClient } from '../simpleapp/generate/clients/SimpleAppClient'
10
10
  import type { JSONSchema7,JSONSchema7Definition } from 'json-schema';
11
11
 
12
12
  const props = defineProps<{
@@ -7,10 +7,7 @@
7
7
  * author: Ks Tan
8
8
  */
9
9
 
10
- import {
11
- InputTableColumnType,
12
- InputTableColumn,
13
- } from "@simitgroup/simpleapp-vue-component/src/type";
10
+
14
11
  import Column from "primevue/column";
15
12
  const { $BranchDoc } = useNuxtApp();
16
13
  const doc = $BranchDoc();
@@ -7,10 +7,6 @@
7
7
  * author: Ks Tan
8
8
  */
9
9
 
10
- import {
11
- InputTableColumnType,
12
- InputTableColumn,
13
- } from "@simitgroup/simpleapp-vue-component/src/type";
14
10
  import Column from "primevue/column";
15
11
  const { $OrganizationDoc, $BranchDoc, $listen } = useNuxtApp();
16
12
  //organization
@@ -7,10 +7,6 @@
7
7
  * author: Ks Tan
8
8
  */
9
9
 
10
- import {
11
- InputTableColumnType,
12
- InputTableColumn,
13
- } from "@simitgroup/simpleapp-vue-component/src/type";
14
10
  import Column from "primevue/column";
15
11
  const { $TenantDoc } = useNuxtApp();
16
12
  const doc = $TenantDoc();
@@ -0,0 +1,5 @@
1
+ export type ListItem = {
2
+ name: string
3
+ code: string
4
+ data: any
5
+ }
@@ -3,7 +3,7 @@ import {
3
3
  SchemaType,
4
4
  RESTMethods,
5
5
  IsolationType,
6
- } from "/Users/kstan/dev/lowcode/simpleapp-generator/src/type";
6
+ } from '/usr/local/lib/node_modules/@simitgroup/simpleapp-generator/src/type';
7
7
  export const product: SchemaType = {
8
8
  type: "object",
9
9
  "x-simpleapp-config": {
@@ -1,66 +0,0 @@
1
- <script lang="ts" setup>
2
- /**
3
- * This file was automatically generated by simpleapp generator during initialization.
4
- * You may modify it for your need
5
- * last change 2023-09-09
6
- * author: Ks Tan
7
- */
8
- import { ref, Ref } from "vue";
9
- import { TenantDoc } from "../simpleapp/TenantDoc";
10
- // import OrderList from 'primevue/orderlist';
11
- import Panel from "primevue/panel";
12
-
13
- const { $event, $listen, $userstore } = useNuxtApp();
14
- const route = useRoute();
15
- const userinfo =ref()
16
- const tenantlist = ref()
17
- onNuxtReady(()=>{
18
-
19
- console.log("res",res)
20
- userinfo.value = $userstore.getUserInfo();
21
- tenantlist.value=userinfo.value.xOrgList
22
- // console.log('tenantlist',tenantlist.value)
23
- // const firstxorg = userinfo.value.xOrgList[0].xorg;
24
- // if(firstxorg){
25
- // navigateTo(`/${firstxorg}`)
26
- // }
27
-
28
-
29
- })
30
-
31
-
32
- </script>
33
- <template>
34
- <div>
35
- <Panel header="Tenant List">
36
- <div>
37
- <NuxtLink
38
- v-for="item in tenantlist"
39
- :external="true"
40
- :to="`/${item.xorg}`"
41
- class="tenant-link"
42
- >
43
- <div class="flex flex-wrap p-2 align-items-center gap-3">
44
- <div class="flex-1 flex flex-column gap-2">
45
- <span class="font-bold">{{ item.orgId }} - {{ item.orgName }}</span>
46
- <div class="flex align-items-center gap-2">
47
- <span>{{ item.branchId }} - {{ item.branchCode }}</span>
48
- </div>
49
- </div>
50
- <span class="font-bold text-900">{{ item.xorg }}</span>
51
- </div>
52
- </NuxtLink>
53
- {{ userinfo }}
54
- </div>
55
- </Panel>
56
- </div>
57
- </template>
58
-
59
- <style scoped>
60
- .p-panel {
61
- @apply m-2;
62
- }
63
- .tenant-link:hover div {
64
- @apply bg-gray-300;
65
- }
66
- </style>