@burh/nuxt-core 1.0.205 → 1.0.206

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.
@@ -17,7 +17,7 @@
17
17
  no-match-text="Nenhuma vaga encontrada"
18
18
  no-data-text="Nenhuma vaga encontrada"
19
19
  placeholder="Escolha"
20
- v-model="job"
20
+ v-model="jobs.job"
21
21
  class="w-100"
22
22
  >
23
23
  <el-option
@@ -35,7 +35,7 @@
35
35
  no-match-text="Nenhum dado encontrado"
36
36
  no-data-text="Nenhum dado encontrado"
37
37
  placeholder="Escolha"
38
- v-model="reason"
38
+ v-model="jobs.reason"
39
39
  class="w-100"
40
40
  >
41
41
  <el-option
@@ -54,7 +54,7 @@
54
54
  v-slot="{ errors }"
55
55
  >
56
56
  <base-input
57
- v-model="salary"
57
+ v-model="jobs.salary"
58
58
  class="w-100 mt-4"
59
59
  id="salary"
60
60
  :error="errors[0]"
@@ -65,7 +65,7 @@
65
65
  />
66
66
  </validation-provider>
67
67
 
68
- <el-checkbox v-model="confidential">
68
+ <el-checkbox v-model="jobs.confidential">
69
69
  Confidencial
70
70
  </el-checkbox>
71
71
 
@@ -75,13 +75,14 @@
75
75
  <textarea
76
76
  id="observations"
77
77
  class="form-control"
78
- v-model="observations"
78
+ v-model="jobs.observations"
79
79
  ></textarea>
80
80
 
81
81
  <button
82
82
  type="button"
83
83
  @click="sendRequest"
84
84
  class="btn btn-primary"
85
+ :disabled="!jobs.job || !jobs.reason"
85
86
  >
86
87
  Solicitar Abertura
87
88
  </button>
@@ -118,12 +119,13 @@ export default {
118
119
  },
119
120
  data() {
120
121
  return {
121
- name: '',
122
- job: '',
123
- reason: '',
124
- salary: '',
125
- confidential: false,
126
- observations: '',
122
+ jobs: {
123
+ job: '',
124
+ reason: '',
125
+ salary: 'R$ 0,00',
126
+ confidential: false,
127
+ observations: ''
128
+ },
127
129
  allReasons: [
128
130
  {
129
131
  value: 'Aumento de quadro',
@@ -133,18 +135,17 @@ export default {
133
135
  value: 'Outra coisa que não sei ainda',
134
136
  label: 'Outra coisa que não sei ainda'
135
137
  }
136
- ],
137
- mask: ''
138
+ ]
138
139
  };
139
140
  },
140
141
  methods: {
141
142
  async sendRequest() {
142
143
  const pass = await this.$refs.sendTest.validate();
143
- if (!pass) {
144
+ if (!pass || !this.jobs.job || !this.jobs.reason) {
144
145
  return;
145
146
  }
146
147
 
147
- let salary = this.salary;
148
+ let salary = this.jobs.salary;
148
149
  salary = this.replaceAll(salary, '.', '');
149
150
  salary = salary
150
151
  .replace(',', '.')
@@ -152,16 +153,20 @@ export default {
152
153
  .trim();
153
154
 
154
155
  let payload = {
155
- job_id: this.job,
156
+ job_id: this.jobs.job,
156
157
  user_id: parseInt(this.userId),
157
- reason: this.reason,
158
+ reason: this.jobs.reason,
158
159
  salary: parseInt(salary),
159
- private: this.confidential,
160
- note: this.observations
160
+ private: this.jobs.confidential,
161
+ note: this.jobs.observations
161
162
  };
162
163
 
163
164
  this.$emit('send-request', payload);
164
165
  this.$emit('close');
166
+
167
+ let field = {};
168
+ for (field in this.jobs) this.jobs[field] = '';
169
+ this.jobs.salary = 'R$ 0,00';
165
170
  },
166
171
  setSalary(e, onlyMasking = false) {
167
172
  let value = e
@@ -171,7 +176,7 @@ export default {
171
176
  .replace(',', '');
172
177
 
173
178
  if (value.trim() == '') {
174
- this.salary = 'R$ 0,00';
179
+ this.jobs.salary = 'R$ 0,00';
175
180
  return;
176
181
  }
177
182
 
@@ -191,7 +196,7 @@ export default {
191
196
  }
192
197
 
193
198
  if (!onlyMasking) {
194
- this.salary = parseFloat(value).toLocaleString('pt-BR', {
199
+ this.jobs.salary = parseFloat(value).toLocaleString('pt-BR', {
195
200
  style: 'currency',
196
201
  currency: 'BRL'
197
202
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.205",
3
+ "version": "1.0.206",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {