@movalib/movalib-commons 1.68.20 → 1.68.21
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.
|
@@ -76,3 +76,4 @@ export default class Garage {
|
|
|
76
76
|
}
|
|
77
77
|
export declare function isStockActive(g: Garage): boolean;
|
|
78
78
|
export declare function getSetting(settings: Settings[], code: string): string | null;
|
|
79
|
+
export declare function getSettingBool(settings: Settings[], code: string): boolean;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isStockActive = isStockActive;
|
|
4
4
|
exports.getSetting = getSetting;
|
|
5
|
+
exports.getSettingBool = getSettingBool;
|
|
5
6
|
var Settings_1 = require("./Settings");
|
|
6
7
|
var Garage = /** @class */ (function () {
|
|
7
8
|
function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, secondaryContactPhone, prestationCategories, dayPeriodFastServiceExcluded, loanerVehicleFastServiceExcluded, fastServiceThreshold, timezone, settings, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce, mailCustomization, billingActive, billingToken, legacyQuoteActive, appId, establishmentRegistrationNumber, companyRegistrationNumber, reopeningDate, targetMargin, demoBillingActive, onlyBilling, newDocumentEditor, googleReviewUrl, isOnlineAppointment, isOnlineQuote) {
|
|
@@ -63,3 +64,7 @@ function getSetting(settings, code) {
|
|
|
63
64
|
var _a, _b;
|
|
64
65
|
return (_b = (_a = settings.find(function (s) { return s.code === code; })) === null || _a === void 0 ? void 0 : _a.valueText) !== null && _b !== void 0 ? _b : null;
|
|
65
66
|
}
|
|
67
|
+
function getSettingBool(settings, code) {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
return (_b = (_a = settings.find(function (s) { return s.code === code; })) === null || _a === void 0 ? void 0 : _a.valueBoolean) !== null && _b !== void 0 ? _b : false;
|
|
70
|
+
}
|
|
@@ -4,6 +4,7 @@ exports.SettingsEnumCode = void 0;
|
|
|
4
4
|
var SettingsEnumCode;
|
|
5
5
|
(function (SettingsEnumCode) {
|
|
6
6
|
SettingsEnumCode["STOCK_MODULE_ENABLED"] = "STOCK_MODULE_ENABLED";
|
|
7
|
+
SettingsEnumCode["NO_PHONE_CUSTOMER_CREATION"] = "NO_PHONE_CUSTOMER_CREATION";
|
|
7
8
|
})(SettingsEnumCode || (exports.SettingsEnumCode = SettingsEnumCode = {}));
|
|
8
9
|
var Settings = /** @class */ (function () {
|
|
9
10
|
function Settings(code, valueBoolean, valueText, valueNumber) {
|
package/package.json
CHANGED
package/src/models/Garage.ts
CHANGED
|
@@ -169,4 +169,8 @@ export function isStockActive (g: Garage): boolean {
|
|
|
169
169
|
}
|
|
170
170
|
export function getSetting(settings: Settings[], code: string): string | null {
|
|
171
171
|
return settings.find((s) => s.code === code)?.valueText ?? null;
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
export function getSettingBool(settings: Settings[], code: string): boolean {
|
|
175
|
+
return settings.find((s) => s.code === code)?.valueBoolean ?? false;
|
|
172
176
|
}
|