@burh/nuxt-core 1.0.399 → 1.0.401

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"
@@ -326,7 +328,9 @@ export default {
326
328
  this.name = to.name;
327
329
  this.social = to.razao_social;
328
330
  this.description = to.description;
329
- this.contacts = to.contact,
331
+
332
+ to.contact.length > 0 && (this.contacts = to.contact);
333
+
330
334
  this.cnpj = to.cnpj;
331
335
  this.cep = to.cep;
332
336
  this.address = to.address;
@@ -343,15 +347,7 @@ export default {
343
347
  social: '',
344
348
  description: '',
345
349
  cnpj: '',
346
- contacts: [
347
- {
348
- name:'',
349
- email:'',
350
- phone:'',
351
- cellphone:'',
352
- note:'',
353
- }
354
- ],
350
+ contacts: [],
355
351
  cep: '',
356
352
  address: '',
357
353
  city: '',
@@ -386,27 +382,21 @@ export default {
386
382
  this.social = '';
387
383
  this.description = '';
388
384
  this.cnpj = '';
389
- this.contacts = [
390
- {
391
- name:'',
392
- email:'',
393
- phone:'',
394
- cellphone:'',
395
- note:'',
396
- }
397
- ],
385
+ this.contacts = [],
398
386
  this.cep = '';
399
387
  this.address = '';
400
388
  this.city = '';
401
389
 
402
- this.$refs.sendRole.reset();
390
+ this.addSlot();
391
+
392
+ this.$refs.sendRole && this.$refs.sendRole.reset();
403
393
  },
404
394
  addSlot(){
405
395
  const newContacts = {
406
396
  name:'',
407
397
  email:'',
408
- phone:'',
409
- cellphone:'',
398
+ phone_number:'',
399
+ cellphone_number:'',
410
400
  note:'',
411
401
  };
412
402
 
@@ -491,6 +481,8 @@ export default {
491
481
  },
492
482
  mounted() {
493
483
  this.getCityList();
484
+
485
+ !this.isEditing && this.addSlot();
494
486
  }
495
487
  };
496
488
  </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.401",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {