@kigi/components 1.5.3 → 1.5.4
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
|
@@ -39,6 +39,7 @@ class MbgAddressController {
|
|
|
39
39
|
public manualLabel
|
|
40
40
|
public fullAddress
|
|
41
41
|
private GOOGLE_API_KEY = 'AIzaSyB0aH7e6XjWJ-xViji3CuXHBbLuWRALC78'
|
|
42
|
+
private notFoundPremisse
|
|
42
43
|
|
|
43
44
|
constructor(
|
|
44
45
|
public $scope,
|
|
@@ -340,6 +341,13 @@ class MbgAddressController {
|
|
|
340
341
|
formalCode,
|
|
341
342
|
uf,
|
|
342
343
|
}
|
|
344
|
+
if (!premisse) {
|
|
345
|
+
if (this.notFoundPremisse) {
|
|
346
|
+
this.notFoundPremisse()
|
|
347
|
+
}
|
|
348
|
+
this.openModalManual(false, this.address)
|
|
349
|
+
return
|
|
350
|
+
}
|
|
343
351
|
this.updateSteps()
|
|
344
352
|
this.createFullName()
|
|
345
353
|
this.$timeout(() => this.focusInputNumber())
|
|
@@ -525,7 +533,7 @@ class MbgAddressController {
|
|
|
525
533
|
return str
|
|
526
534
|
}
|
|
527
535
|
|
|
528
|
-
openModalManual(EX: boolean = false) {
|
|
536
|
+
openModalManual(EX: boolean = false, address?) {
|
|
529
537
|
const modal = this.$uibModal.open({
|
|
530
538
|
animation: true,
|
|
531
539
|
template: MbgAddressManualTemplate,
|
|
@@ -533,6 +541,7 @@ class MbgAddressController {
|
|
|
533
541
|
controllerAs: '$ctrl',
|
|
534
542
|
size: 'md',
|
|
535
543
|
resolve: {
|
|
544
|
+
address: () => address,
|
|
536
545
|
EX,
|
|
537
546
|
notFound: () => this.notFound,
|
|
538
547
|
},
|
|
@@ -541,6 +550,7 @@ class MbgAddressController {
|
|
|
541
550
|
if (response) {
|
|
542
551
|
response.zipCode = response.zipCode || ''
|
|
543
552
|
this.address.country = response.country || 'Brasil'
|
|
553
|
+
this.address.premisse = response.premisse || this.address.premisse
|
|
544
554
|
this.ngModel = response
|
|
545
555
|
if (!EX) {
|
|
546
556
|
this.$timeout(() => this.searchAddressInfo(JSON.parse(JSON.stringify(response))))
|
|
@@ -566,6 +576,7 @@ const mbgAddress = {
|
|
|
566
576
|
cepClass: '=?',
|
|
567
577
|
onFinishFocusElement: '@?',
|
|
568
578
|
manualLabel: '@?',
|
|
579
|
+
notFoundPremisse: '&?',
|
|
569
580
|
},
|
|
570
581
|
template,
|
|
571
582
|
controller: MbgAddressController,
|
|
@@ -37,6 +37,7 @@ class MbgAddressManualController {
|
|
|
37
37
|
public mbgAddressService,
|
|
38
38
|
public EX,
|
|
39
39
|
public notFound,
|
|
40
|
+
public address,
|
|
40
41
|
) {}
|
|
41
42
|
|
|
42
43
|
$onInit() {
|
|
@@ -44,6 +45,9 @@ class MbgAddressManualController {
|
|
|
44
45
|
this.createAutocompleteDisabled()
|
|
45
46
|
this.loadStates()
|
|
46
47
|
this.loadCountries()
|
|
48
|
+
if (this.address) {
|
|
49
|
+
this.entity = this.address
|
|
50
|
+
}
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
validateLenth() {
|
|
@@ -173,6 +177,7 @@ MbgAddressManualController['$inject'] = [
|
|
|
173
177
|
'mbgAddressService',
|
|
174
178
|
'EX',
|
|
175
179
|
'notFound',
|
|
180
|
+
'address',
|
|
176
181
|
]
|
|
177
182
|
|
|
178
183
|
export { MbgAddressManualController }
|
|
@@ -47,6 +47,8 @@ class MbgStatusLabelController {
|
|
|
47
47
|
this.label = 'Autorizada'
|
|
48
48
|
break
|
|
49
49
|
case 'CANCELADA':
|
|
50
|
+
case 'CANCELLED':
|
|
51
|
+
case 'CANCELED':
|
|
50
52
|
this.label = 'Cancelada'
|
|
51
53
|
break
|
|
52
54
|
case 'REJEITADA':
|
|
@@ -91,6 +93,8 @@ class MbgStatusLabelController {
|
|
|
91
93
|
case 'REJEITADA':
|
|
92
94
|
case 'PENDING_REJECT':
|
|
93
95
|
case 'REJECTED':
|
|
96
|
+
case 'CANCELLED':
|
|
97
|
+
case 'CANCELED':
|
|
94
98
|
this.labelClass = 'error'
|
|
95
99
|
break
|
|
96
100
|
case 'PASSED_ALONG':
|