@bildvitta/quasar-ui-asteroid 3.13.0-beta.2 → 3.13.0-beta.4
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
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="ellipsis qas-app-user__menu-name">{{ userName }}</div>
|
|
18
18
|
<div class="ellipsis">{{ user.email }}</div>
|
|
19
19
|
|
|
20
|
-
<qas-select v-if="hasCompaniesSelect" v-model="companiesModel" class="q-my-md"
|
|
20
|
+
<qas-select v-if="hasCompaniesSelect" v-model="companiesModel" class="q-my-md" v-bind="defaultCompanyProps" @update:model-value="setCompanies" />
|
|
21
21
|
|
|
22
22
|
<q-list class="q-mt-md">
|
|
23
23
|
<q-item v-close-popup :active="false" class="qas-app-user__menu-item" clickable :to="user.to">
|
|
@@ -69,14 +69,9 @@ export default {
|
|
|
69
69
|
type: String
|
|
70
70
|
},
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
currentCompany: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: ''
|
|
72
|
+
companyProps: {
|
|
73
|
+
default: () => ({}),
|
|
74
|
+
type: Object
|
|
80
75
|
},
|
|
81
76
|
|
|
82
77
|
menuProps: {
|
|
@@ -106,6 +101,18 @@ export default {
|
|
|
106
101
|
},
|
|
107
102
|
|
|
108
103
|
computed: {
|
|
104
|
+
defaultCompanyProps () {
|
|
105
|
+
return {
|
|
106
|
+
dataCy: 'app-user-companies-select',
|
|
107
|
+
loading: this.loading,
|
|
108
|
+
|
|
109
|
+
...this.companyProps,
|
|
110
|
+
|
|
111
|
+
// não é possível alterar o label.
|
|
112
|
+
label: 'Vínculo'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
109
116
|
hasNotifications () {
|
|
110
117
|
return !!Object.keys(this.notifications).length
|
|
111
118
|
},
|
|
@@ -115,12 +122,12 @@ export default {
|
|
|
115
122
|
},
|
|
116
123
|
|
|
117
124
|
hasCompaniesSelect () {
|
|
118
|
-
return !!this.
|
|
125
|
+
return !!this.companyProps.options?.length
|
|
119
126
|
}
|
|
120
127
|
},
|
|
121
128
|
|
|
122
129
|
watch: {
|
|
123
|
-
|
|
130
|
+
'companyProps.modelValue': {
|
|
124
131
|
handler (value) {
|
|
125
132
|
this.companiesModel = value
|
|
126
133
|
},
|
|
@@ -144,7 +151,8 @@ export default {
|
|
|
144
151
|
|
|
145
152
|
setTimeout(() => location.reload(), 1500)
|
|
146
153
|
} catch {
|
|
147
|
-
this.companiesModel = this.
|
|
154
|
+
this.companiesModel = this.companyProps.modelValue
|
|
155
|
+
|
|
148
156
|
this.$qas.error('Falha ao alterar vínculo.')
|
|
149
157
|
} finally {
|
|
150
158
|
this.loading = false
|
|
@@ -9,15 +9,10 @@ props:
|
|
|
9
9
|
default: 36px
|
|
10
10
|
type: String
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
desc:
|
|
14
|
-
default:
|
|
15
|
-
type:
|
|
16
|
-
|
|
17
|
-
current-company:
|
|
18
|
-
desc: Empresa atual vinculada
|
|
19
|
-
default: ''
|
|
20
|
-
type: String
|
|
12
|
+
company-props:
|
|
13
|
+
desc: Repassa props pro QasSelect de vínculo de empresas (não é possível alterar o label).
|
|
14
|
+
default: {}
|
|
15
|
+
type: Object
|
|
21
16
|
|
|
22
17
|
menu-props:
|
|
23
18
|
desc: Repassa props pro QMenu.
|