22 <crud
33 :prefix =" prefix"
44 :path =" path"
5- :paths =" paths"
65 :page-title =" pageTitle"
76 :fields-info =" fieldsInfo"
87 :details-title =" $t('detailsTitle')"
@@ -17,12 +16,9 @@ import Crud from '@/utils/crud/components/Crud.vue'
1716export default {
1817 data () {
1918 return {
20- prefix: ' crud/admin' ,
21- path: ' user-permissions' ,
22- paths: {
23- i: ' admin/user-permissions'
24- },
25- pageTitle: ' admin.userPermissions'
19+ prefix: ' crud/cms' ,
20+ path: ' settings' ,
21+ pageTitle: ' cms.settings'
2622 }
2723 },
2824 computed: {
@@ -35,41 +31,41 @@ export default {
3531 },
3632 {
3733 type: ' select' ,
38- url: ' crud/admin/users' ,
3934 list: {
40- value: ' id' ,
41- text: ' name' ,
42- data: []
35+ value: ' name' ,
36+ text: ' label' ,
37+ data: [
38+ {
39+ name: ' input' ,
40+ label: this .$t (' fieldTypes.input' )
41+ },
42+ {
43+ name: ' textarea' ,
44+ label: this .$t (' fieldTypes.textarea' )
45+ },
46+ {
47+ name: ' file' ,
48+ label: this .$t (' fieldTypes.file' )
49+ }
50+ ]
4351 },
44- column: ' user_id' ,
45- text: this .$t (' fields.user' ),
46- name: ' user' ,
47- apiObject: {
48- name: ' user.name'
49- }
52+ stringId: true ,
53+ column: ' type' ,
54+ text: this .$t (' fields.type' ),
55+ name: ' type'
5056 },
5157 {
52- text: this .$t (' fields.userEmail' ),
53- name: ' userEmail' ,
54- apiObject: {
55- name: ' user.email'
56- },
57- details: false
58+ type: ' input' ,
59+ column: ' name' ,
60+ text: this .$t (' fields.name' ),
61+ name: ' name'
5862 },
5963 {
60- type: ' select' ,
61- url: ' crud/admin/permissions' ,
62- list: {
63- value: ' id' ,
64- text: ' name' ,
65- data: []
66- },
67- column: ' permission_id' ,
68- text: this .$t (' fields.permission' ),
69- name: ' permission' ,
70- apiObject: {
71- name: ' permission.name'
72- }
64+ type: ' dynamic' ,
65+ typeField: ' type' ,
66+ column: ' value' ,
67+ text: this .$t (' fields.value' ),
68+ name: ' value'
7369 }
7470 ]
7571 }
@@ -80,23 +76,31 @@ export default {
8076 i18n: {
8177 messages: {
8278 pl: {
83- detailsTitle: ' Użytkownik - uprawnienie ' ,
79+ detailsTitle: ' Parametr ' ,
8480 fields: {
8581 id: ' Id' ,
86- user: ' Użytkownik' ,
87- userEmail: ' E-mail użytkownika' ,
88- permission: ' Uprawnienie' ,
89- permissionCode: ' Kod uprawnienia'
82+ type: ' Typ pola' ,
83+ name: ' Nazwa parametru' ,
84+ value: ' Wartość'
85+ },
86+ fieldTypes: {
87+ input: ' Tekst' ,
88+ textarea: ' Długi tekst' ,
89+ file: ' Plik'
9090 }
9191 },
9292 en: {
93- detailsTitle: ' User - permission ' ,
93+ detailsTitle: ' Parameter ' ,
9494 fields: {
9595 id: ' Id' ,
96- user: ' User' ,
97- userEmail: ' User\' s e-mail' ,
98- permission: ' Permission' ,
99- permissionCode: ' Permission code'
96+ type: ' Field type' ,
97+ name: ' Name' ,
98+ value: ' Value'
99+ },
100+ fieldTypes: {
101+ input: ' Input' ,
102+ textarea: ' Textarea' ,
103+ file: ' File'
100104 }
101105 }
102106 }
0 commit comments