@optimiser/common 1.0.254 → 1.0.255
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/dist/lib/utility.js +7 -0
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -3664,6 +3664,8 @@ function SyncCompanyLicenceInMasterCompanyAfterAdd(fieldsObj, dbMaster) {
|
|
|
3664
3664
|
setQuery_1['TotalEnterpriseLicence'] = 0;
|
|
3665
3665
|
var totalNoOfFeatureLicence = 0;
|
|
3666
3666
|
var totalNoOfAppLicence = 0;
|
|
3667
|
+
//Added by Chetan on 22Feb2022, for domain licence
|
|
3668
|
+
var totalNoOfDomainLicence = 0;
|
|
3667
3669
|
for (var c = 0; c < companyLicences.length; c++) {
|
|
3668
3670
|
var licenceType = companyLicences[c]._id['LicenceType'];
|
|
3669
3671
|
var licenceName = companyLicences[c]._id['LicenceName'];
|
|
@@ -3677,6 +3679,9 @@ function SyncCompanyLicenceInMasterCompanyAfterAdd(fieldsObj, dbMaster) {
|
|
|
3677
3679
|
else if (licenceType == 'App') {
|
|
3678
3680
|
totalNoOfAppLicence += parseInt(companyLicenceTotal);
|
|
3679
3681
|
}
|
|
3682
|
+
else if (licenceType == 'Domain') {
|
|
3683
|
+
totalNoOfDomainLicence += parseInt(companyLicenceTotal); /*Added by Chetan on 22Feb2022, for domain licence*/
|
|
3684
|
+
}
|
|
3680
3685
|
for (var i in companyLicencesData_2) {
|
|
3681
3686
|
if (i == licenceType) {
|
|
3682
3687
|
var companyLicenceType = companyLicencesData_2[i];
|
|
@@ -3690,6 +3695,8 @@ function SyncCompanyLicenceInMasterCompanyAfterAdd(fieldsObj, dbMaster) {
|
|
|
3690
3695
|
}
|
|
3691
3696
|
setQuery_1['TotalFeatureLicence'] = totalNoOfFeatureLicence;
|
|
3692
3697
|
setQuery_1['TotalAppLicence'] = totalNoOfAppLicence;
|
|
3698
|
+
//Added by Chetan on 22Feb2022, for domain licence
|
|
3699
|
+
setQuery_1['TotalDomainLicence'] = totalNoOfDomainLicence;
|
|
3693
3700
|
setQuery_1.Setting["Licences"] = companyLicencesData_2;
|
|
3694
3701
|
dbMaster.collection('Company').updateOne({ _id: companyId_1, 'IsActive': true }, { $set: setQuery_1 });
|
|
3695
3702
|
}
|