@hostlink/nuxt-light 0.0.110 → 0.0.111

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "0.0.110"
4
+ "version": "0.0.111"
5
5
  }
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
- import { getModelColumns } from '../../lib';
3
- const columns = getModelColumns("SystemValue", ["name", "value"]);
2
+ import { model } from "#imports"
3
+ const columns = model("SystemValue").columns(["name", "value"]);
4
4
  </script>
5
5
  <template>
6
6
  <l-page>
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
- import { getObject, getModelFields, q, getModelColumns } from '../../../';
2
+ import { model, getObject, getModelFields, q } from '../../../';
3
+
3
4
  const obj = await getObject(["user_id", "username", "first_name", "last_name", "email", "phone", "roles", 'status', 'join_date']);
4
5
 
5
6
  </script>
@@ -25,16 +26,10 @@ const obj = await getObject(["user_id", "username", "first_name", "last_name", "
25
26
  </l-list>
26
27
  </l-card>
27
28
 
28
-
29
-
30
29
  <l-tabs>
31
-
32
30
  <l-tab label="Event log">
33
31
  <l-table row-key="eventlog_id" sort-by="eventlog_id:desc"
34
- :columns="getModelColumns('EventLog', ['eventlog_id', 'class', 'id', 'action', 'created_time'])"
35
- @request="async (req) => {
36
-
37
-
32
+ :columns="model('EventLog').columns(['eventlog_id', 'class', 'id', 'action', 'created_time'])" @request="async (req) => {
38
33
  const a = {
39
34
  listUser: {
40
35
  __args: {
@@ -53,12 +48,8 @@ const obj = await getObject(["user_id", "username", "first_name", "last_name", "
53
48
 
54
49
  let resp = await q(a);
55
50
  req.setData(resp.listUser.data[0].eventLog)
56
-
57
-
58
51
  }" />
59
52
  </l-tab>
60
-
61
53
  </l-tabs>
62
-
63
54
  </l-page>
64
55
  </template>
@@ -1,6 +1,5 @@
1
1
  <script setup>
2
- import { q, getModelColumns } from '../../'
3
- import { getGQLFields } from '#imports'
2
+ import { q, getGQLFields, model } from '#imports'
4
3
  import { toQuery } from '@hostlink/light';
5
4
 
6
5
  const { my } = await q(
@@ -32,14 +31,14 @@ const { my } = await q(
32
31
  }
33
32
  )
34
33
 
35
- const userlogColumns = getModelColumns('UserLog', ['login_dt', 'result', 'user_agent']);
34
+ const userlogColumns = model('UserLog').columns(['login_dt', 'result', 'user_agent']);
36
35
  //remove all searchable
37
36
  userlogColumns.forEach(col => {
38
37
  col.searchable = false;
39
38
  })
40
39
 
41
40
 
42
- const eventLogCols = getModelColumns('EventLog', ['class', 'action', 'created_time']);
41
+ const eventLogCols = model('EventLog').columns(['class', 'action', 'created_time']);
43
42
  //remove all searchable
44
43
  eventLogCols.forEach(col => {
45
44
  col.searchable = false;
@@ -52,7 +51,6 @@ eventLogCols.forEach(col => {
52
51
  <l-btn icon="sym_o_key" to="update-password" label="Update password" />
53
52
  <l-btn icon="sym_o_key" to="two-factor-auth" label="Two factor auth" />
54
53
  </template>
55
-
56
54
  <div class="q-gutter-md q-mt-md">
57
55
  <l-card>
58
56
  <l-list>
@@ -77,7 +75,5 @@ eventLogCols.forEach(col => {
77
75
  </l-table>
78
76
  </l-card>
79
77
  </div>
80
-
81
-
82
78
  </l-page>
83
79
  </template>
@@ -24,6 +24,7 @@ declare const _default: {
24
24
  label: string;
25
25
  sortable: boolean;
26
26
  searchable: boolean;
27
+ searchType: string;
27
28
  };
28
29
  username: {
29
30
  label: string;
@@ -23,7 +23,8 @@ export default {
23
23
  created_time: {
24
24
  label: "Created time",
25
25
  sortable: true,
26
- searchable: true
26
+ searchable: true,
27
+ searchType: "date"
27
28
  },
28
29
  username: {
29
30
  label: "Username",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "0.0.110",
3
+ "version": "0.0.111",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",