@burh/nuxt-core 1.0.399 → 1.0.400

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.
@@ -5,7 +5,7 @@
5
5
  custom-class="position-relative"
6
6
  @close="$emit('close')"
7
7
  >
8
- <template>
8
+ <template v-if="isActive">
9
9
  <div class="role">
10
10
  <h3>{{ isEditing ? 'Editando Cliente' : 'Cadastrar Cliente' }}</h3>
11
11
 
@@ -152,7 +152,9 @@
152
152
  :valid="errors.length ? true : false"
153
153
  />
154
154
  </validation-provider>
155
+
155
156
  <h2>Contato</h2>
157
+
156
158
  <div v-for="(contact, idx) in contacts" :key="idx">
157
159
  <div class="border p-3 rounded">
158
160
  <validation-provider
@@ -199,7 +201,7 @@
199
201
  <label for="phone">Telefone</label>
200
202
  <base-input
201
203
  type="text"
202
- v-model="contact.phone"
204
+ v-model="contact.phone_number"
203
205
  :mask="['(##) ####-####']"
204
206
  placeholder="Telefone com DDD"
205
207
  :error="errors[0]"
@@ -217,8 +219,8 @@
217
219
  <label for="cellphone">Celular</label>
218
220
  <base-input
219
221
  type="text"
220
- v-model="contact.cellphone"
221
- :mask="['(##) #####-####']"
222
+ v-model="contact.cellphone_number"
223
+ :mask="['(##) ####-####', '(##) #####-####']"
222
224
  placeholder="Celular com DDD"
223
225
  :error="errors[0]"
224
226
  :valid="errors.length ? true : false"
@@ -343,15 +345,7 @@ export default {
343
345
  social: '',
344
346
  description: '',
345
347
  cnpj: '',
346
- contacts: [
347
- {
348
- name:'',
349
- email:'',
350
- phone:'',
351
- cellphone:'',
352
- note:'',
353
- }
354
- ],
348
+ contacts: [],
355
349
  cep: '',
356
350
  address: '',
357
351
  city: '',
@@ -386,27 +380,21 @@ export default {
386
380
  this.social = '';
387
381
  this.description = '';
388
382
  this.cnpj = '';
389
- this.contacts = [
390
- {
391
- name:'',
392
- email:'',
393
- phone:'',
394
- cellphone:'',
395
- note:'',
396
- }
397
- ],
383
+ this.contacts = [],
398
384
  this.cep = '';
399
385
  this.address = '';
400
386
  this.city = '';
401
387
 
402
- this.$refs.sendRole.reset();
388
+ this.addSlot();
389
+
390
+ this.$refs.sendRole && this.$refs.sendRole.reset();
403
391
  },
404
392
  addSlot(){
405
393
  const newContacts = {
406
394
  name:'',
407
395
  email:'',
408
- phone:'',
409
- cellphone:'',
396
+ phone_number:'',
397
+ cellphone_number:'',
410
398
  note:'',
411
399
  };
412
400
 
@@ -491,6 +479,8 @@ export default {
491
479
  },
492
480
  mounted() {
493
481
  this.getCityList();
482
+
483
+ !this.isEditing && this.addSlot();
494
484
  }
495
485
  };
496
486
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.399",
3
+ "version": "1.0.400",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {