buildingproduct-library 0.2.79 → 0.2.81
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/{buildingproduct-library-0.2.79.tgz → buildingproduct-library-0.2.81.tgz} +0 -0
- package/bundles/buildingproduct-library.umd.js +73 -57
- package/bundles/buildingproduct-library.umd.js.map +1 -1
- package/esm2015/lib/account-dropdown/account-dropdown.component.js +3 -2
- package/esm2015/lib/find-store/find-store.component.js +2 -2
- package/esm2015/lib/my-team/my-team.component.js +28 -3
- package/fesm2015/buildingproduct-library.js +30 -4
- package/fesm2015/buildingproduct-library.js.map +1 -1
- package/lib/my-team/my-team.component.d.ts +1 -1
- package/package.json +1 -1
|
Binary file
|
|
@@ -982,42 +982,38 @@
|
|
|
982
982
|
}
|
|
983
983
|
AccountDropdownComponent.prototype.ngOnInit = function () {
|
|
984
984
|
return __awaiter(this, void 0, void 0, function () {
|
|
985
|
-
var isLoaded;
|
|
986
985
|
var _this = this;
|
|
987
986
|
return __generator(this, function (_c) {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
_this.
|
|
1001
|
-
if (data) {
|
|
1002
|
-
_this.showWaitCursor.next(false);
|
|
1003
|
-
_this.accounts = data;
|
|
1004
|
-
_this.getAccountsData();
|
|
1005
|
-
}
|
|
1006
|
-
});
|
|
987
|
+
this.selecteduserData = JSON.parse(localStorage.getItem('selectedAccout') || '{}');
|
|
988
|
+
this.fiUserAccountDetailsService.getUserAccount().subscribe(function (user) {
|
|
989
|
+
var _a, _b;
|
|
990
|
+
if (user) {
|
|
991
|
+
var username = (_a = user.uid) === null || _a === void 0 ? void 0 : _a.toString();
|
|
992
|
+
var cartObj = localStorage.getItem('spartacus⚿dimond-spa⚿cart');
|
|
993
|
+
var cartId = (_b = JSON.parse(cartObj)) === null || _b === void 0 ? void 0 : _b.active;
|
|
994
|
+
if (cartId) {
|
|
995
|
+
_this.service.getAccountDatawithCartId(cartId).subscribe(function (data) {
|
|
996
|
+
if (data) {
|
|
997
|
+
_this.showWaitCursor.next(false);
|
|
998
|
+
_this.accounts = data;
|
|
999
|
+
_this.getAccountsData();
|
|
1007
1000
|
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1001
|
+
}, function (error) {
|
|
1002
|
+
window.location.reload();
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
else {
|
|
1006
|
+
_this.service.getAccountData().subscribe(function (data) {
|
|
1007
|
+
if (data) {
|
|
1008
|
+
_this.showWaitCursor.next(false);
|
|
1009
|
+
_this.accounts = data;
|
|
1010
|
+
_this.getAccountsData();
|
|
1016
1011
|
}
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
return [2 /*return*/];
|
|
1021
1017
|
});
|
|
1022
1018
|
});
|
|
1023
1019
|
};
|
|
@@ -1219,31 +1215,26 @@
|
|
|
1219
1215
|
}
|
|
1220
1216
|
FindStoreComponent.prototype.ngOnInit = function () {
|
|
1221
1217
|
return __awaiter(this, void 0, void 0, function () {
|
|
1222
|
-
var isLoaded;
|
|
1223
1218
|
var _this = this;
|
|
1224
1219
|
return __generator(this, function (_b) {
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
}, 100);
|
|
1244
|
-
});
|
|
1245
|
-
return [2 /*return*/];
|
|
1246
|
-
}
|
|
1220
|
+
// const isLoaded = await this.fiUserAccountDetailsService.isEnviornmentLoaded();
|
|
1221
|
+
this.findStoreService.homeBranch.subscribe(function (data) {
|
|
1222
|
+
setTimeout(function () {
|
|
1223
|
+
var _a;
|
|
1224
|
+
if (data) {
|
|
1225
|
+
if (localStorage.getItem('branchDetails')) {
|
|
1226
|
+
_this.homeBranchData = localStorage.getItem('branchDetails');
|
|
1227
|
+
_this.branchName = (_a = JSON.parse(_this.homeBranchData)) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
1228
|
+
_this.cd.markForCheck();
|
|
1229
|
+
}
|
|
1230
|
+
else {
|
|
1231
|
+
_this.branchName = data === null || data === void 0 ? void 0 : data.displayName;
|
|
1232
|
+
_this.cd.markForCheck();
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}, 100);
|
|
1236
|
+
});
|
|
1237
|
+
return [2 /*return*/];
|
|
1247
1238
|
});
|
|
1248
1239
|
});
|
|
1249
1240
|
};
|
|
@@ -6122,8 +6113,33 @@
|
|
|
6122
6113
|
this.createUpdateToast = false;
|
|
6123
6114
|
};
|
|
6124
6115
|
MyTeamComponent.prototype.findOrgUnit = function (data) {
|
|
6125
|
-
var _a
|
|
6126
|
-
|
|
6116
|
+
var _a;
|
|
6117
|
+
var name = '';
|
|
6118
|
+
(_a = this.orgUnits) === null || _a === void 0 ? void 0 : _a.forEach(function (ele) {
|
|
6119
|
+
var _a;
|
|
6120
|
+
if (ele.uid == data.uid) {
|
|
6121
|
+
name = ele.name;
|
|
6122
|
+
return;
|
|
6123
|
+
}
|
|
6124
|
+
else {
|
|
6125
|
+
(_a = ele === null || ele === void 0 ? void 0 : ele.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
|
|
6126
|
+
var _a;
|
|
6127
|
+
if (child.uid == data.uid) {
|
|
6128
|
+
name = child.name;
|
|
6129
|
+
return child.name;
|
|
6130
|
+
}
|
|
6131
|
+
else {
|
|
6132
|
+
(_a = child === null || child === void 0 ? void 0 : child.children) === null || _a === void 0 ? void 0 : _a.forEach(function (children) {
|
|
6133
|
+
if (children.uid == data.uid) {
|
|
6134
|
+
name = children.name;
|
|
6135
|
+
return;
|
|
6136
|
+
}
|
|
6137
|
+
});
|
|
6138
|
+
}
|
|
6139
|
+
});
|
|
6140
|
+
}
|
|
6141
|
+
});
|
|
6142
|
+
return name;
|
|
6127
6143
|
};
|
|
6128
6144
|
MyTeamComponent.prototype.checkOrgUnit = function (event, data) {
|
|
6129
6145
|
if (event.currentTarget.checked) {
|