@kigi/components 1.44.0-beta.2 → 1.44.0-beta.3
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.
package/package.json
CHANGED
|
@@ -3,9 +3,6 @@ import template from './mbg-average-customer-time.html'
|
|
|
3
3
|
import Highcharts from 'highcharts'
|
|
4
4
|
import Exporting from 'highcharts/modules/exporting.js'
|
|
5
5
|
import Accessibility from 'highcharts/modules/accessibility.js'
|
|
6
|
-
import { MbgAlert } from '@kigi/components/src/helpers/services/mbg-alert'
|
|
7
|
-
import { MbgTypeAlert } from '@kigi/components/src/helpers/enums/mbg-type-alert'
|
|
8
|
-
import { ButtonConfirmModal } from '@kigi/components/src/helpers/interfaces/button-confirm-modal'
|
|
9
6
|
|
|
10
7
|
Exporting(Highcharts)
|
|
11
8
|
Accessibility(Highcharts)
|
|
@@ -28,7 +25,6 @@ class MbgAverageCustomerTimeController {
|
|
|
28
25
|
public $timeout,
|
|
29
26
|
public $filter,
|
|
30
27
|
public $state,
|
|
31
|
-
public mbgAlert: MbgAlert,
|
|
32
28
|
) {}
|
|
33
29
|
|
|
34
30
|
async $onInit() {
|
|
@@ -88,58 +84,10 @@ class MbgAverageCustomerTimeController {
|
|
|
88
84
|
}
|
|
89
85
|
|
|
90
86
|
async clickedPoint(clickedPoint) {
|
|
91
|
-
const response = await this.mbgAlert.confirm({
|
|
92
|
-
type: MbgTypeAlert.INFORMATION,
|
|
93
|
-
title: 'Escolha uma Ação',
|
|
94
|
-
message: 'Deseja enviar uma mensagem ou imprimir o relatório?',
|
|
95
|
-
textConfirm: 'Enviar mensagem',
|
|
96
|
-
textCancel: 'Imprimir relatório',
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
if (response) {
|
|
100
|
-
this.sendMensage(clickedPoint)
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
async toKnowZapi(value) {
|
|
105
|
-
const buttons: ButtonConfirmModal[] = [
|
|
106
|
-
{
|
|
107
|
-
label: 'Conhecer Z-API',
|
|
108
|
-
onClick: () => {
|
|
109
|
-
return true
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
label: 'Cancelar',
|
|
114
|
-
style: 'LEAKED',
|
|
115
|
-
onClick: () => {
|
|
116
|
-
return false
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
]
|
|
120
|
-
|
|
121
|
-
const response = await this.mbgAlert.confirm({
|
|
122
|
-
title: 'Atenção',
|
|
123
|
-
type: MbgTypeAlert.WARNING,
|
|
124
|
-
visibleCancel: false,
|
|
125
|
-
message:
|
|
126
|
-
'Para envio de mensagens deve-se contratar Z-API. Caso ainda não tenha feito o contrato de teste, faça um teste de 2 dias.',
|
|
127
|
-
buttons,
|
|
128
|
-
})
|
|
129
|
-
console.log('response', response)
|
|
130
|
-
if (!response) return
|
|
131
|
-
return this.$state.go('app.mobi-store.form', { doc: 'Z-API' })
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async sendMensage(clickedPoint) {
|
|
135
87
|
if (this.callBackInstanceZapi) {
|
|
136
|
-
await this.callBackInstanceZapi()
|
|
88
|
+
await this.callBackInstanceZapi({ value: clickedPoint })
|
|
137
89
|
return
|
|
138
90
|
}
|
|
139
|
-
const interval = this.percentagesReturnCustomerTime.find(
|
|
140
|
-
(person) => person.days === Number(clickedPoint.name),
|
|
141
|
-
)
|
|
142
|
-
this.$state.go('app.individual-messages.individual-messages', { ids: interval.ids })
|
|
143
91
|
}
|
|
144
92
|
|
|
145
93
|
configPanelPercentagesReturnCustomerTime() {
|
|
@@ -317,7 +265,6 @@ MbgAverageCustomerTimeController['$inject'] = [
|
|
|
317
265
|
'$timeout',
|
|
318
266
|
'$filter',
|
|
319
267
|
'$state',
|
|
320
|
-
'mbgAlert',
|
|
321
268
|
]
|
|
322
269
|
|
|
323
270
|
const mbgAverageCustomerTime = {
|