@drax/identity-vue 0.5.1 → 0.5.3
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.5.
|
|
6
|
+
"version": "0.5.3",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@drax/common-front": "^0.5.1",
|
|
28
28
|
"@drax/common-vue": "^0.5.1",
|
|
29
|
-
"@drax/crud-share": "^0.5.
|
|
29
|
+
"@drax/crud-share": "^0.5.3",
|
|
30
30
|
"@drax/identity-share": "^0.5.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"vue-tsc": "^2.1.6",
|
|
65
65
|
"vuetify": "^3.7.1"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "56ea5a743bce196d6322ae6c26ea5b041450d7a3"
|
|
68
68
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
|
|
2
|
+
import {EntityCrud} from "@drax/crud-vue";
|
|
3
|
+
import {TenantSystemFactory} from "@drax/identity-front";
|
|
4
|
+
import type {IEntityCrud, IEntityCrudField, IEntityCrudHeader} from "@drax/crud-share";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TenantCrud extends EntityCrud implements IEntityCrud {
|
|
8
|
+
|
|
9
|
+
static singleton: TenantCrud
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.name = 'Tenant'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static get instance(): TenantCrud {
|
|
17
|
+
if(!TenantCrud.singleton){
|
|
18
|
+
TenantCrud.singleton = new TenantCrud()
|
|
19
|
+
}
|
|
20
|
+
return TenantCrud.singleton
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get permissions(){
|
|
24
|
+
return {
|
|
25
|
+
manage: 'tenant:manage',
|
|
26
|
+
view: 'tenant:view',
|
|
27
|
+
create: 'tenant:create',
|
|
28
|
+
update: 'tenant:update',
|
|
29
|
+
delete: 'tenant:delete'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get headers():IEntityCrudHeader[] {
|
|
34
|
+
return [
|
|
35
|
+
//{title: 'id',key:'_id', align: 'start'},
|
|
36
|
+
{title: 'name',key:'name', align: 'start'}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
get provider(){
|
|
41
|
+
return TenantSystemFactory.getInstance()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
get refs(){
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
get rules(){
|
|
51
|
+
return {
|
|
52
|
+
name: [(v: any) => !!v || 'Requerido']
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get fields(): IEntityCrudField[]{
|
|
57
|
+
return [
|
|
58
|
+
{name: 'name', type: 'string', label: 'name', default:'' }
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
get dialogFullscreen(){
|
|
63
|
+
return false
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
get exportHeaders(){
|
|
67
|
+
return ['_id', 'name']
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default TenantCrud
|
|
73
|
+
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
import
|
|
2
|
+
import TenantCrud from '../cruds/tenant-crud/TenantCrud'
|
|
3
|
+
import {Crud} from "@drax/crud-vue";
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<template>
|
|
7
|
-
<TenantCrud
|
|
7
|
+
<crud :entity="TenantCrud.instance">
|
|
8
|
+
|
|
9
|
+
</crud>
|
|
8
10
|
</template>
|
|
9
11
|
|
|
10
12
|
<style scoped>
|