@burh/nuxt-core 1.0.320 → 1.0.321

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.
@@ -0,0 +1,204 @@
1
+ <template>
2
+ <el-dialog
3
+ :visible.sync="isActive"
4
+ width="55%"
5
+ custom-class="position-relative"
6
+ @close="$emit('close')"
7
+ >
8
+ <template>
9
+ <div class="role">
10
+ <h3>Adicionar Setor</h3>
11
+
12
+ <section>
13
+ <validation-observer ref="sendRole">
14
+ <validation-provider
15
+ tag="div"
16
+ name="Nome"
17
+ rules="required"
18
+ v-slot="{ errors }"
19
+ >
20
+ <label for="name">Nome</label>
21
+ <base-input
22
+ type="text"
23
+ id="name"
24
+ v-model="name"
25
+ :error="errors[0]"
26
+ :valid="errors.length ? true : false"
27
+ />
28
+ </validation-provider>
29
+ </validation-observer>
30
+
31
+ <label for="name">Permissão</label>
32
+ <el-select
33
+ filterable
34
+ no-match-text="Nenhuma permissão encontrada"
35
+ no-data-text="Nenhuma permissão encontrada"
36
+ placeholder="Escolha"
37
+ v-model="permissions"
38
+ class="w-100"
39
+ >
40
+ <el-option
41
+ v-for="(item, index) in permessionsData"
42
+ class="select-danger"
43
+ :value="item.id"
44
+ :label="item.name"
45
+ :key="index"
46
+ ></el-option>
47
+ </el-select>
48
+
49
+ <button
50
+ type="button"
51
+ :class="{'invalid-form': name === '' && !permissions}"
52
+ :disabled="name === '' && !permissions"
53
+ @click="sendRequest"
54
+ >
55
+ Enviar
56
+ </button>
57
+ </section>
58
+ </div>
59
+
60
+ <span class="tool tool-close" @click="$emit('close')">
61
+ Fechar
62
+ <font-awesome-icon
63
+ :icon="['fas', 'times']"
64
+ class="text-white ml-1"
65
+ />
66
+ </span>
67
+ </template>
68
+ </el-dialog>
69
+ </template>
70
+
71
+ <script>
72
+ import { Dialog, Select, Option } from 'element-ui';
73
+
74
+ export default {
75
+ name: 'add-role-modal',
76
+ components: {
77
+ [Dialog.name]: Dialog,
78
+ [Select.name]: Select,
79
+ [Option.name]: Option,
80
+ },
81
+ props: {
82
+ isActive: {
83
+ type: Boolean,
84
+ default: false,
85
+ description: 'Modal open verification'
86
+ },
87
+ },
88
+ data() {
89
+ return {
90
+ name: '',
91
+ permissions: null,
92
+ permessionsData: [
93
+ {
94
+ id: 1,
95
+ name: 'Administrador'
96
+ },
97
+ {
98
+ id: 2,
99
+ name: 'Usuário Empresas'
100
+ },
101
+ {
102
+ id: 3,
103
+ name: 'Portal do RH'
104
+ },
105
+ {
106
+ id: 4,
107
+ name: 'Universidade Corporativa'
108
+ },
109
+ ]
110
+ };
111
+ },
112
+ methods: {
113
+ async sendRequest() {
114
+ const pass = await this.$refs.sendRole.validate();
115
+ if (!pass) {
116
+ return;
117
+ }
118
+
119
+ let payload = {
120
+ level: this.name,
121
+ permission: this.permissions
122
+ };
123
+
124
+ this.$emit('add-role', payload);
125
+ }
126
+ }
127
+ };
128
+ </script>
129
+
130
+ <style lang="scss" scoped>
131
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
132
+
133
+ /deep/ .el-dialog__body {
134
+ padding: 0;
135
+ }
136
+
137
+ /deep/ .el-dialog__header {
138
+ display: none;
139
+ }
140
+
141
+ /deep/ .el-dialog {
142
+ overflow: hidden;
143
+ border-radius: 10px;
144
+ padding-bottom: 50px;
145
+ max-width: 47.5rem;
146
+ }
147
+
148
+ .role {
149
+ padding: 2rem 3rem;
150
+
151
+ section {
152
+ margin-top: 2rem;
153
+
154
+ button {
155
+ position: absolute;
156
+ right: 48px;
157
+ bottom: 25px;
158
+
159
+ margin-left: auto;
160
+
161
+ width: 7.375rem;
162
+ height: 2rem;
163
+
164
+ background: #5865F2;
165
+ color: $white;
166
+
167
+ border-radius: 87px;
168
+
169
+ border: 0;
170
+ outline: 0;
171
+ }
172
+
173
+ .invalid-form {
174
+ opacity: 0.3;
175
+ }
176
+ }
177
+ }
178
+
179
+ .tool {
180
+ position: absolute;
181
+ top: 1rem;
182
+ z-index: 10;
183
+ color: $primary;
184
+ cursor: pointer;
185
+
186
+ &-close {
187
+ position: absolute;
188
+ width: 88px;
189
+ height: 27px;
190
+ right: 7px;
191
+ top: 7px;
192
+ display: flex;
193
+ justify-content: center;
194
+ align-items: center;
195
+
196
+ font-size: 11px;
197
+
198
+ font-weight: 500;
199
+ background: rgba(0, 0, 0, 0.2);
200
+ border-radius: 17.5px;
201
+ color: #fff;
202
+ }
203
+ }
204
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.320",
3
+ "version": "1.0.321",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {