vue-intergrall-plugins 1.0.0 → 1.0.2

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.
@@ -3,17 +3,31 @@
3
3
  <div v-if="Object.keys(infoCanal).length > 0">
4
4
  <!-- CHIPS -->
5
5
  <div class="d-flex overflow-hidden mt-10 w-100 d-flex flex-wrap">
6
- <div
6
+ <div
7
7
  v-if="situation || deadline.text"
8
- class="d-flex-center flex-column w-100 border-radius-10 border-1 bg-dark-white-2 border-color-gray p-10 mb-10"
9
- :style="`${situation && situation.cor ? `border: 1px solid ${situation.cor}` : ''}`"
8
+ class="d-flex-center flex-column w-100 border-radius-10 border-1 bg-dark-white-2 border-color-gray p-10 mb-10"
9
+ :style="`${
10
+ situation && situation.cor ? `border: 1px solid ${situation.cor}` : ''
11
+ }`"
10
12
  >
11
13
  <div class="d-flex w-100 mb-5">
12
- <strong v-if="situation" class="text-ellipsis text-left fs-_85" v-text="`${dictionary.chip_situacao}:`"></strong>
13
- <span v-if="situation" :style="`color: ${situation.cor}`" class="ml-5 text-left fs-_85 text-shadow" v-text="verificaInfos(situation)"></span>
14
+ <strong
15
+ v-if="situation"
16
+ class="text-ellipsis text-left fs-_85"
17
+ v-text="`${dictionary.chip_situacao}:`"
18
+ ></strong>
19
+ <span
20
+ v-if="situation"
21
+ :style="`color: ${situation.cor}`"
22
+ class="ml-5 text-left fs-_85 text-shadow"
23
+ v-text="verificaInfos(situation)"
24
+ ></span>
14
25
  </div>
15
26
  <div class="d-flex w-100" v-if="deadline.text">
16
- <strong v-text="`${deadline.title}:`" class="text-ellipsis text-left fs-_75"></strong>
27
+ <strong
28
+ v-text="`${deadline.title}:`"
29
+ class="text-ellipsis text-left fs-_75"
30
+ ></strong>
17
31
  <span class="ml-5 text-nowrap text-left fs-_75" v-text="deadline.text"></span>
18
32
  </div>
19
33
  </div>
@@ -22,38 +36,86 @@
22
36
  <!-- TABELA INTERATIVIDADE HO -->
23
37
  <template v-if="informacao.length">
24
38
  <div class="interatividade-form-header d-flex justify-content-between">
25
- {{dictionary.msg_abertura_reclamacao}}
39
+ {{ dictionary.msg_abertura_reclamacao }}
26
40
  <span class="d-flex-center">
27
41
  <fa-icon :icon="['fas', 'calendar']" class="mr-5" />
28
- {{formataDataHora(infoCanal.DATA_ABERTURA)}}
42
+ {{ formataDataHora(infoCanal.DATA_ABERTURA) }}
29
43
  </span>
30
44
  </div>
31
45
  <div class="interatividade-form-body">
32
- <div v-for="(form) in informacao" :key="form.TIPO_TEXTO" class="interatividade-info-form">
33
- <p v-if="form.TIPO_TEXTO < 1000" v-text="form.DESC_TIPO_TEXTO" class="interatividade-titulo-form"></p>
34
- <p v-if="form.TIPO_TEXTO < 1000" v-text="form.TEXTO" class="interatividade-description-form"></p>
46
+ <div
47
+ v-for="form in informacao"
48
+ :key="form.TIPO_TEXTO"
49
+ class="interatividade-info-form"
50
+ >
51
+ <p
52
+ v-if="form.TIPO_TEXTO < 1000"
53
+ v-text="form.DESC_TIPO_TEXTO"
54
+ class="interatividade-titulo-form"
55
+ ></p>
56
+ <p
57
+ v-if="form.TIPO_TEXTO < 1000"
58
+ v-text="form.TEXTO"
59
+ class="interatividade-description-form"
60
+ ></p>
35
61
  </div>
36
62
  <div v-if="informacaoAdicional.length" class="interatividade-form-header">
37
- {{dictionary.msg_info_adicional}}
63
+ {{ dictionary.msg_info_adicional }}
38
64
  </div>
39
65
  <div class="interatividade-form-body">
40
- <div v-for="(form) in informacaoAdicional" :key="form.TIPO_TEXTO" class="interatividade-add-info-form">
66
+ <div
67
+ v-for="form in informacaoAdicional"
68
+ :key="form.TIPO_TEXTO"
69
+ class="interatividade-add-info-form"
70
+ >
41
71
  <div class="divisor-form-info-aditional">
42
72
  <div class="info-aditional">
43
- <p v-if="form.TIPO_TEXTO > 999" v-text="form.DESC_TIPO_TEXTO+': '" class="interatividade-titulo-form"></p>
73
+ <p
74
+ v-if="form.TIPO_TEXTO > 999"
75
+ v-text="form.DESC_TIPO_TEXTO + ': '"
76
+ class="interatividade-titulo-form"
77
+ ></p>
44
78
  </div>
45
79
  <div class="info-aditional">
46
- <p v-if="form.TIPO_TEXTO > 999" v-text="form.TEXTO" class="interatividade-description-form"></p>
80
+ <p
81
+ v-if="form.TIPO_TEXTO > 999"
82
+ v-text="form.TEXTO"
83
+ class="interatividade-description-form"
84
+ ></p>
47
85
  </div>
48
86
  </div>
49
87
  </div>
50
88
  </div>
51
89
  <h3 class="m-5 text-bold" v-text="`Anexos`"></h3>
52
90
  <div class="d-flex flex-wrap align-items-center">
53
- <div v-for="({ name, type, mkuDownload, mku }, fileIndex) in anexos" :key="`file-${fileIndex}`" class="mb-5 mx-5 d-flex">
54
- <img class="box-shadow max-w-75px max-h-75px cursor-pointer" @click="openFile(mku, type)" v-if="!type" :src="`${dominio}/callcenter/docs.php?mku=${mku}`" :alt="name" :title="name" />
55
- <fa-icon v-else :icon="returnCurrentIcon(type)" @click="openFile(mku, type)" :class="returnCurrentClass(type)" :title="name" />
56
- <a class="d-flex align-items-end ml-3 text-dark" :href="`${dominio}/callcenter/docs.php?mku=${mkuDownload}`" :download="`${name}`" target="_blank" rel="noreferrer noopener" :title="`Download ${name}`">
91
+ <div
92
+ v-for="({ name, type, mkuDownload, mku }, fileIndex) in anexos"
93
+ :key="`file-${fileIndex}`"
94
+ class="mb-5 mx-5 d-flex"
95
+ >
96
+ <img
97
+ class="box-shadow max-w-75px max-h-75px cursor-pointer"
98
+ @click="openFile(mku, type)"
99
+ v-if="!type"
100
+ :src="`${dominio}/callcenter/docs.php?mku=${mku}`"
101
+ :alt="name"
102
+ :title="name"
103
+ />
104
+ <fa-icon
105
+ v-else
106
+ :icon="returnCurrentIcon(type)"
107
+ @click="openFile(mku, type)"
108
+ :class="returnCurrentClass(type)"
109
+ :title="name"
110
+ />
111
+ <a
112
+ class="d-flex align-items-end ml-3 text-dark"
113
+ :href="`${dominio}/callcenter/docs.php?mku=${mkuDownload}`"
114
+ :download="`${name}`"
115
+ target="_blank"
116
+ rel="noreferrer noopener"
117
+ :title="`Download ${name}`"
118
+ >
57
119
  <fa-icon :icon="['fas', 'download']" />
58
120
  </a>
59
121
  </div>
@@ -64,82 +126,91 @@
64
126
  </div>
65
127
  </template>
66
128
  <script>
67
- import InteratividadePopup from './InteratividadePopup'
68
- import { formataData, formataDataHora } from '../../services/textFormatting';
129
+ import InteratividadePopup from "./InteratividadePopup";
130
+ import { formataData, formataDataHora } from "../../services/textFormatting";
69
131
 
70
132
  export default {
71
- components: {InteratividadePopup},
133
+ components: { InteratividadePopup },
72
134
  data() {
73
135
  return {
74
136
  informacaoAdicional: [],
75
- informacao: []
76
- }
137
+ informacao: [],
138
+ };
77
139
  },
78
140
  props: {
79
141
  interatividade: {
80
142
  type: Object,
81
- required: true
143
+ required: true,
82
144
  },
83
145
  infoCanal: {
84
146
  type: [Object, Array],
85
147
  required: false,
86
- default: {}
148
+ default: {},
87
149
  },
88
150
  dominio: {
89
151
  type: String,
90
- required: true
152
+ required: true,
91
153
  },
92
154
  dictionary: {
93
155
  type: Object,
94
- required: true
156
+ required: true,
95
157
  },
96
158
  anexos: {
97
159
  type: Array,
98
- required: false
99
- }
160
+ required: false,
161
+ },
100
162
  },
101
163
  computed: {
102
164
  situation() {
103
165
  try {
104
- const { SITUACAO } = this.infoCanal
105
- return SITUACAO ? SITUACAO : null
106
- }catch(e) {
107
- console.error("Erro ao gerar a situacao do atendimento")
108
- console.error(e)
166
+ const { SITUACAO } = this.infoCanal;
167
+ return SITUACAO ? SITUACAO : null;
168
+ } catch (e) {
169
+ console.error("Erro ao gerar a situacao do atendimento");
170
+ console.error(e);
109
171
  }
110
172
  },
111
173
  deadline() {
112
174
  try {
113
- const { PRAZO, NOME_CAMPO_PRAZO } = this.infoCanal
114
- return { text: PRAZO ? formataData(PRAZO) : "---", title: NOME_CAMPO_PRAZO ? NOME_CAMPO_PRAZO : this.dictionary.tit_prazo }
115
- }catch(e) {
116
- console.error("Erro ao gerar o prazo do atendimento")
117
- console.error(e)
118
- return {}
175
+ const { PRAZO, NOME_CAMPO_PRAZO } = this.infoCanal;
176
+ return {
177
+ text: PRAZO ? formataData(PRAZO) : "---",
178
+ title: NOME_CAMPO_PRAZO ? NOME_CAMPO_PRAZO : this.dictionary.tit_prazo,
179
+ };
180
+ } catch (e) {
181
+ console.error("Erro ao gerar o prazo do atendimento");
182
+ console.error(e);
183
+ return {};
119
184
  }
120
185
  },
121
186
  },
122
- mounted(){
123
- if(this.validateInterativity()){
187
+ mounted() {
188
+ if (this.validateInterativity()) {
124
189
  this.verifyInfoAditional();
125
190
  }
126
191
  },
127
192
  methods: {
128
193
  returnCurrentClass(isDoc) {
129
- return `fs-2 cursor-pointer ${typeof isDoc == 'string' && isDoc.indexOf('pdf') > -1 ? 'text-red' : 'text-blue'}`
194
+ return `fs-2 cursor-pointer ${
195
+ typeof isDoc == "string" && isDoc.indexOf("pdf") > -1 ? "text-red" : "text-blue"
196
+ }`;
130
197
  },
131
198
  returnCurrentIcon(isDoc) {
132
- return typeof isDoc == 'string' && isDoc.indexOf('pdf') > -1 ? ['fas', 'file-pdf'] : ['fas', 'file-alt']
199
+ return typeof isDoc == "string" && isDoc.indexOf("pdf") > -1
200
+ ? ["fas", "file-pdf"]
201
+ : ["fas", "file-alt"];
133
202
  },
134
203
  openFile(url, isImg) {
135
- const width = window.innerWidth
136
- const height = window.innerHeight
137
- const options = !isImg ? `width=${width},height=${height}` : "width=auto,height=auto"
138
- window.open(`${this.dominio}/callcenter/docs.php?mku=${url}`, "card-file", options)
204
+ const width = window.innerWidth;
205
+ const height = window.innerHeight;
206
+ const options = !isImg
207
+ ? `width=${width},height=${height}`
208
+ : "width=auto,height=auto";
209
+ window.open(`${this.dominio}/callcenter/docs.php?mku=${url}`, "card-file", options);
139
210
  },
140
- validateInterativity(){
211
+ validateInterativity() {
141
212
  try {
142
- if(this.interatividade.formulario && this.interatividade.formulario.length){
213
+ if (this.interatividade.formulario && this.interatividade.formulario.length) {
143
214
  return true;
144
215
  }
145
216
  } catch (error) {
@@ -148,245 +219,189 @@ export default {
148
219
  },
149
220
  verifyInfoAditional() {
150
221
  try {
151
- let { formulario } = this.interatividade
222
+ let { formulario } = this.interatividade;
152
223
  formulario = formulario ? formulario : [];
153
- if(!formulario.length) return
154
- const foundInfosAdd = formulario.filter(f => f.TIPO_TEXTO > 999);
155
- const foundInfos = formulario.filter(f => f.TIPO_TEXTO < 1000);
156
- if(foundInfos){
157
- this.informacao = foundInfos.map(info => {
158
- if(info.TIPO_TEXTO == 1){
159
- info.TEXTO = info.TEXTO == 'S' ? this.dictionary.msg_sim : this.dictionary.msg_nao
224
+ if (!formulario.length) return;
225
+ const foundInfosAdd = formulario.filter((f) => f.TIPO_TEXTO > 999);
226
+ const foundInfos = formulario.filter((f) => f.TIPO_TEXTO < 1000);
227
+ if (foundInfos) {
228
+ this.informacao = foundInfos.map((info) => {
229
+ if (info.TIPO_TEXTO == 1) {
230
+ info.TEXTO =
231
+ info.TEXTO == "S" ? this.dictionary.msg_sim : this.dictionary.msg_nao;
160
232
  }
161
- return info
162
- })
233
+ return info;
234
+ });
163
235
  }
164
- if(foundInfosAdd) this.informacaoAdicional = foundInfosAdd;
236
+ if (foundInfosAdd) this.informacaoAdicional = foundInfosAdd;
165
237
  } catch (e) {
166
- console.error("Erro ao pegar o objeto interatividade formulario")
167
- console.error(e)
238
+ console.error("Erro ao pegar o objeto interatividade formulario");
239
+ console.error(e);
168
240
  }
169
241
  },
170
- verificaInfos(text){
171
- if(typeof text === 'string'){
242
+ verificaInfos(text) {
243
+ if (typeof text === "string") {
172
244
  return text;
173
245
  }
174
- if(typeof text === 'object'){
246
+ if (typeof text === "object") {
175
247
  return text.desc;
176
248
  }
177
249
  },
178
- formataDataHora(date){
250
+ formataDataHora(date) {
179
251
  return formataDataHora(date);
180
- }
181
- }
182
- }
252
+ },
253
+ },
254
+ };
183
255
  </script>
184
256
 
185
257
  <style scoped>
186
- .show-x-enter-active,
187
- .show-x-leave-enter {
188
- opacity: 1;
189
- transform: translateX(0);
190
- transition: all 200ms linear;
191
- }
192
- .show-x-enter,
193
- .show-x-leave-to {
194
- opacity: 0;
195
- transform: translateX(5%);
196
- }
197
- .divisor-form-info-aditional {
198
- display: flex;
199
- align-items: center;
200
- justify-content: space-around;
201
- }
202
- .info-aditional {
203
- border-bottom: 1px solid #ccc;
204
- width: 49%;
205
- }
206
- .interatividade-form-header {
207
- background-color: #efefef;
208
- margin-top: 5px;
209
- border-top-right-radius: 10px;
210
- border-top-left-radius: 10px;
211
- padding-left: 10px;
212
- padding-right: 10px;
213
- padding-top: 5px;
214
- padding-bottom: 5px;
215
- justify-content: space-between;
216
- display: flex;
217
- color: #333;
218
- font-weight: 700;
219
- font-size: 14.4px;
220
- }
221
- .interatividade-form-body{
222
- padding: 0px 10px;
223
- background: white;
224
- border-right: 1px solid rgb(239, 239, 239);
225
- border-left: 1px solid rgb(239, 239, 239);
226
- border-bottom-left-radius: 10px;
227
- border-bottom-right-radius: 10px;
228
- padding-bottom: 10px;
229
- }
230
- .interatividade {
231
- margin: 10px 0;
232
- }
233
- .interatividade-titulo-form {
234
- white-space: nowrap;
235
- text-overflow: ellipsis;
236
- font-weight: bold;
237
- overflow: hidden;
238
- max-width: 100%;
239
- margin: 0;
240
- padding: 0;
241
- padding-top: 5px;
242
- }
243
- .interatividade-description-form {
244
- overflow: hidden;
245
- max-width: 100%;
246
- margin: 0;
247
- padding: 0;
248
- }
249
-
250
- .interatividade-lista {
251
- width: 100%;
252
- min-width: 200px;
253
- border-radius: 15px;
254
- background-color: #FFF;
255
- color: #333;
256
- margin: 10px 0;
257
- }
258
- .interatividade-lista-conteudo {
259
- padding: 10px;
260
- border-bottom: 1px solid #D7D7D7;
261
- }
262
- .interatividade-lista-titulo {
263
- font-weight: bold;
264
- font-size: 1.2em;
265
- margin-bottom: 10px;
266
- }
267
- .interatividade-lista-rodape {
268
- color: #818181;
269
- margin-top: 5px;
270
- }
271
- .interatividade-lista-link {
272
- width: 100%;
273
- text-align: center;
274
- padding: 10px;
275
- color: rgb(0, 110, 255);
276
- cursor: pointer;
277
- transition: color 200ms ease-in-out;
278
- }
279
- .interatividade-lista-link:hover {
280
- color: rgb(0, 98, 143);
281
- }
282
- .text-blue {
283
- color: #294ED3;
284
- }
285
- .text-red {
286
- color: #E74C3C
287
- }
288
- .text-dark {
289
- color: #333;
290
- }
291
- .ml-3 {
292
- margin-left: 3px;
293
- }
294
- .fs-2 {
295
- font-size: 32px;
296
- }
297
- .flex-wrap {
298
- flex-wrap: wrap;
299
- }
300
- .align-items-center {
301
- align-items: center;
302
- }
303
- .d-flex {
304
- display: flex;
305
- }
306
- .align-items-end {
307
- align-items: flex-end;
308
- }
309
- .flex-column {
310
- flex-direction: column;
311
- }
312
- .text-bold {
313
- font-weight: bold;
314
- }
315
- .m-5 {
316
- margin: 5px;
317
- }
318
- .mb-5 {
319
- margin-bottom: 5px;
320
- }
321
- .mx-5 {
322
- margin-left: 5px;
323
- margin-right: 5px;
324
- }
325
- .cursor-pointer {
326
- cursor: pointer;
327
- }
328
- .bg-dark-white-2 {
329
- background-color: #f7f7f7;
330
- }
331
- .border-radius-10 {
332
- border-radius: 10px;
333
- }
334
- .w-100 {
335
- width: 100%;
336
- }
337
- .overflow-hidden {
338
- overflow: hidden;
339
- }
340
- .mt-10 {
341
- margin-top: 10px;
342
- }
343
- .flex-wrap {
344
- flex-wrap: wrap;
345
- }
346
- .d-flex {
347
- display: flex;
348
- }
349
- .p-10 {
258
+ .divisor-form-info-aditional {
259
+ display: flex;
260
+ align-items: center;
261
+ justify-content: space-around;
262
+ }
263
+ .info-aditional {
264
+ border-bottom: 1px solid #ccc;
265
+ width: 49%;
266
+ }
267
+ .interatividade-form-header {
268
+ background-color: #efefef;
269
+ margin-top: 5px;
270
+ border-top-right-radius: 10px;
271
+ border-top-left-radius: 10px;
272
+ padding-left: 10px;
273
+ padding-right: 10px;
274
+ padding-top: 5px;
275
+ padding-bottom: 5px;
276
+ justify-content: space-between;
277
+ display: flex;
278
+ color: #333;
279
+ font-weight: 700;
280
+ font-size: 14.4px;
281
+ }
282
+ .interatividade-form-body {
283
+ padding: 0px 10px;
284
+ background: white;
285
+ border-right: 1px solid rgb(239, 239, 239);
286
+ border-left: 1px solid rgb(239, 239, 239);
287
+ border-bottom-left-radius: 10px;
288
+ border-bottom-right-radius: 10px;
289
+ padding-bottom: 10px;
290
+ }
291
+ .interatividade {
292
+ margin: 10px 0;
293
+ }
294
+ .interatividade-titulo-form {
295
+ white-space: nowrap;
296
+ text-overflow: ellipsis;
297
+ font-weight: bold;
298
+ overflow: hidden;
299
+ max-width: 100%;
300
+ margin: 0;
301
+ padding: 0;
302
+ padding-top: 5px;
303
+ }
304
+ .interatividade-description-form {
305
+ overflow: hidden;
306
+ max-width: 100%;
307
+ margin: 0;
308
+ padding: 0;
309
+ }
310
+ .text-dark {
311
+ color: #333;
312
+ }
313
+ .ml-3 {
314
+ margin-left: 3px;
315
+ }
316
+ .flex-wrap {
317
+ flex-wrap: wrap;
318
+ }
319
+ .align-items-center {
320
+ align-items: center;
321
+ }
322
+ .d-flex {
323
+ display: flex;
324
+ }
325
+ .align-items-end {
326
+ align-items: flex-end;
327
+ }
328
+ .flex-column {
329
+ flex-direction: column;
330
+ }
331
+ .text-bold {
332
+ font-weight: bold;
333
+ }
334
+ .m-5 {
335
+ margin: 5px;
336
+ }
337
+ .mb-5 {
338
+ margin-bottom: 5px;
339
+ }
340
+ .mx-5 {
341
+ margin-left: 5px;
342
+ margin-right: 5px;
343
+ }
344
+ .cursor-pointer {
345
+ cursor: pointer;
346
+ }
347
+ .bg-dark-white-2 {
348
+ background-color: #f7f7f7;
349
+ }
350
+ .border-radius-10 {
351
+ border-radius: 10px;
352
+ }
353
+ .w-100 {
354
+ width: 100%;
355
+ }
356
+ .overflow-hidden {
357
+ overflow: hidden;
358
+ }
359
+ .mt-10 {
360
+ margin-top: 10px;
361
+ }
362
+ .flex-wrap {
363
+ flex-wrap: wrap;
364
+ }
365
+ .d-flex {
366
+ display: flex;
367
+ }
368
+ .p-10 {
350
369
  padding: 10px;
351
- }
352
- .mb-5 {
353
- margin-bottom: 5px;
354
- }
355
- .mb-10 {
356
- margin-bottom: 10px;
357
- }
358
- .mx-10 {
359
- margin-left: 10px;
360
- margin-right: 10px;
361
- }
362
- .d-flex-center {
363
- display: flex;
364
- justify-content: center;
365
- align-items: center;
366
- }
367
- .fs-_85 {
368
- font-size: 13.6px;
369
- }
370
- .text-ellipsis {
371
- text-overflow: ellipsis;
372
- }
373
- .text-left {
374
- text-align: left;
375
- }
376
- .text-ellipsis {
377
- white-space: nowrap;
378
- overflow: hidden;
379
- }
380
- .ml-5 {
381
- margin-left: 5px;
382
- }
383
- .text-shadow {
384
- text-shadow: 0 0 #000;
385
- }
386
- .justify-content-between{
387
- justify-content: space-between;
388
- }
389
- .mr-5 {
390
- margin-right: 5px;
391
- }
370
+ }
371
+ .mb-5 {
372
+ margin-bottom: 5px;
373
+ }
374
+ .mb-10 {
375
+ margin-bottom: 10px;
376
+ }
377
+ .d-flex-center {
378
+ display: flex;
379
+ justify-content: center;
380
+ align-items: center;
381
+ }
382
+ .fs-_85 {
383
+ font-size: 13.6px;
384
+ }
385
+ .text-ellipsis {
386
+ text-overflow: ellipsis;
387
+ }
388
+ .text-left {
389
+ text-align: left;
390
+ }
391
+ .text-ellipsis {
392
+ white-space: nowrap;
393
+ overflow: hidden;
394
+ }
395
+ .ml-5 {
396
+ margin-left: 5px;
397
+ }
398
+ .text-shadow {
399
+ text-shadow: 0 0 #000;
400
+ }
401
+ .justify-content-between {
402
+ justify-content: space-between;
403
+ }
404
+ .mr-5 {
405
+ margin-right: 5px;
406
+ }
392
407
  </style>