From 227a036fb6148dc116c112e09652d2cccdefeef9 Mon Sep 17 00:00:00 2001 From: natalia-lypovyk Date: Fri, 18 Dec 2020 10:58:07 +0200 Subject: [PATCH 1/9] feat: Extend option entity --- src/shared/entity/category/option.entity.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/entity/category/option.entity.ts b/src/shared/entity/category/option.entity.ts index 6727f34..af786a4 100644 --- a/src/shared/entity/category/option.entity.ts +++ b/src/shared/entity/category/option.entity.ts @@ -20,4 +20,8 @@ export class Option { }) @IsUnion(['string', 'number']) public value: string | number; + + @IsString() + @IsOptional() + public relatedRequirementID?: string; } From c25d3a74130219038f6b69d58806b6a8585e6f8d Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Fri, 18 Dec 2020 11:41:00 +0200 Subject: [PATCH 2/9] feat(do): update 31500000-1 calculation algorithm --- src/do/algorithms/categories/31500000-1.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/do/algorithms/categories/31500000-1.ts b/src/do/algorithms/categories/31500000-1.ts index 3b3c598..71908e8 100644 --- a/src/do/algorithms/categories/31500000-1.ts +++ b/src/do/algorithms/categories/31500000-1.ts @@ -359,7 +359,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { }; }, {} as Calculation); - const selectedBulbType = requirementResponses.find(({ requirement }) => requirement.id.startsWith('02'))?.value as + const selectedBulbType = requirementResponses.find(({ requirement }) => requirement.id.startsWith('03'))?.value as | Variants | undefined; @@ -637,7 +637,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { return ( requirementGroup.id === requirementResponses - .find(({ requirement }) => requirement.id.startsWith('02')) + .find(({ requirement }) => requirement.id.startsWith('03')) ?.requirement.id.replace(/\d{6}$/, '000000') ); }); @@ -665,11 +665,11 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { } // 3) Bulb lifetime - const modeOfUse = this.tryGetModeOfUse(requirementResponses, '03'); + const modeOfUse = this.tryGetModeOfUse(requirementResponses, '04'); if (modeOfUse) { const { hoursInDay, daysInWeek } = modeOfUse; - const tariff = this.tryGetTariff(requirementResponses, '04'); + const tariff = this.tryGetTariff(requirementResponses, '05'); (Object.keys(availableBulbTypes) as Variants[]).forEach((bulbType) => { const { quantity, power } = availableBulbTypes[bulbType]; From e9903520a993bfb3efad05dce780162b99b97d8b Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Fri, 18 Dec 2020 11:47:22 +0200 Subject: [PATCH 3/9] chore: update package.json engine version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 025e422..3b8b311 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ }, "engineStrict": true, "engines": { - "node": ">=12.16.0 <13.0.0" + "node": ">=12.16.0 <=14.15.1" }, "husky": { "hooks": { From ea436782b017278742b4b72b4fcf911d769e3ef4 Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Fri, 18 Dec 2020 11:53:22 +0200 Subject: [PATCH 4/9] feat(documents): add bulb-types images --- documents/31500000-1/bulb-types/E.svg | 1 + documents/31500000-1/bulb-types/G.svg | 1 + documents/31500000-1/bulb-types/R7.svg | 1 + 3 files changed, 3 insertions(+) create mode 100644 documents/31500000-1/bulb-types/E.svg create mode 100644 documents/31500000-1/bulb-types/G.svg create mode 100644 documents/31500000-1/bulb-types/R7.svg diff --git a/documents/31500000-1/bulb-types/E.svg b/documents/31500000-1/bulb-types/E.svg new file mode 100644 index 0000000..c7cad90 --- /dev/null +++ b/documents/31500000-1/bulb-types/E.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/documents/31500000-1/bulb-types/G.svg b/documents/31500000-1/bulb-types/G.svg new file mode 100644 index 0000000..9abea6f --- /dev/null +++ b/documents/31500000-1/bulb-types/G.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/documents/31500000-1/bulb-types/R7.svg b/documents/31500000-1/bulb-types/R7.svg new file mode 100644 index 0000000..fe9f6dd --- /dev/null +++ b/documents/31500000-1/bulb-types/R7.svg @@ -0,0 +1 @@ + \ No newline at end of file From c462bf7acc233afb472bd462ec6fd3c4c9541ae1 Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Fri, 18 Dec 2020 13:05:03 +0200 Subject: [PATCH 5/9] chore(release): 0.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3b8b311..c7ab914 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bulb-project-api", - "version": "0.4.6", + "version": "0.5.0", "description": "API Service for Bulb Project", "author": "uStudio Front-End Department", "license": "MIT", From 5cd62fdfd768f2e101d8c6b2b5065c94812f9f23 Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Thu, 24 Dec 2020 11:37:51 +0200 Subject: [PATCH 6/9] feat(do): update bulbs calculation algorithm 1) Include new light flow type step 2) Calculate eei class depending on selected light flow type --- src/do/algorithms/categories/31110000-0.ts | 4 +- src/do/algorithms/categories/31500000-1.ts | 92 ++++++++++++++++------ src/do/entity/algorithm-engine.ts | 59 ++++++++------ 3 files changed, 103 insertions(+), 52 deletions(-) diff --git a/src/do/algorithms/categories/31110000-0.ts b/src/do/algorithms/categories/31110000-0.ts index c7b1e94..2a75bad 100644 --- a/src/do/algorithms/categories/31110000-0.ts +++ b/src/do/algorithms/categories/31110000-0.ts @@ -115,7 +115,7 @@ export class ElectricMotors extends AlgorithmEngine { }) ); - const modeOfUse = this.tryGetModeOfUse(requestedNeed.requirementResponses, '03'); + const modeOfUse = ElectricMotors.tryGetModeOfUse(requestedNeed.requirementResponses, '03'); if (modeOfUse) { const { hoursInDay, daysInWeek } = modeOfUse; @@ -125,7 +125,7 @@ export class ElectricMotors extends AlgorithmEngine { requestedPower.split('-').length : +requestedPower; - const tariff = this.tryGetTariff(requestedNeed.requirementResponses, '04'); + const tariff = ElectricMotors.tryGetTariff(requestedNeed.requirementResponses, '04'); const ei1YearEnergyProduction = ((availableVariants.find(({ relatedItem }) => relatedItem === Variants.IE1)?.metrics[0].observations[0] .measure as number) || 0) * diff --git a/src/do/algorithms/categories/31500000-1.ts b/src/do/algorithms/categories/31500000-1.ts index 71908e8..0c7a52c 100644 --- a/src/do/algorithms/categories/31500000-1.ts +++ b/src/do/algorithms/categories/31500000-1.ts @@ -23,6 +23,15 @@ import type { SpecificationResponse } from '../../entity/specification'; import { DocxGeneratorService } from '../../services/docx-generator'; import { CsvService } from '../../services/csv'; +enum Criteria { + TypeOfNeed = '01', + TypeOfBase = '02', + BulbType = '03', + LightFlowType = '04', + ModeOfUse = '05', + Tariff = '06', +} + enum Variants { Incandescent = '31519100-8', Halogen = '31512000-8', @@ -71,32 +80,50 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { super(); } - private static calculateEnergyEfficiencyClass(eei: number): string { - if (eei <= 0.13) { - return 'A++'; - } + private static reduceEnergyEfficiencyFormulas( + eei: number, + configuration: Array<[energyEfficiencyClass: string, upperRange?: number]> + ): string { + /* eslint-disable immutable/no-let */ + let [finalEnergyEfficiencyClass] = configuration[0]; - if (eei > 0.13 && eei <= 0.18) { - return 'A+'; - } + for (let i = 0; i < configuration.length; i += 1) { + const [energyEfficiencyClass, upperRange = eei] = configuration[i]; + const [, lowerRange = 0] = configuration[i - 1] || []; - if (eei > 0.18 && eei <= 0.4) { - return 'A'; - } + if (eei > lowerRange && eei <= upperRange) { + finalEnergyEfficiencyClass = energyEfficiencyClass; - if (eei > 0.4 && eei <= 0.95) { - return 'B'; + break; + } } - if (eei > 0.95 && eei <= 1.2) { - return 'C'; - } + return finalEnergyEfficiencyClass; + } - if (eei > 1.2 && eei <= 1.75) { - return 'D'; + private static calculateEnergyEfficiencyClass(eei: number, lightFlowType: LightFlowType): string { + if (lightFlowType === LightFlowType.Directional) { + return LightingEquipmentAndElectricLamps.reduceEnergyEfficiencyFormulas(eei, [ + ['A++', 0.13], + ['A+', 0.18], + ['A', 0.4], + ['B', 0.95], + ['C', 1.2], + ['D', 1.75], + ['E'], + ]); } - return 'E'; + // LightFlowType.NonDirectional + return LightingEquipmentAndElectricLamps.reduceEnergyEfficiencyFormulas(eei, [ + ['A++', 0.11], + ['A+', 0.17], + ['A', 0.24], + ['B', 0.6], + ['C', 0.8], + ['D', 0.95], + ['E'], + ]); } private static getValueFromResponses(responses: RequirementResponse[], requirementId: string): unknown { @@ -303,6 +330,16 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { ]; } + private static getLightFlowType(requirementResponses: RequirementResponse[], criterionNumber: string): LightFlowType { + const [lightFlowTypeResponse] = this.getResponsesForCriterion(requirementResponses, criterionNumber); + + if (!lightFlowTypeResponse) { + return LightFlowType.NonDirectional; + } + + return lightFlowTypeResponse.value as LightFlowType; + } + // eslint-disable-next-line sonarjs/cognitive-complexity public async getCalculation({ category: { items, criteria, conversions }, @@ -359,9 +396,10 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { }; }, {} as Calculation); - const selectedBulbType = requirementResponses.find(({ requirement }) => requirement.id.startsWith('03'))?.value as - | Variants - | undefined; + const selectedBulbType = LightingEquipmentAndElectricLamps.getResponsesForCriterion( + requirementResponses, + Criteria.BulbType + )[0]?.value as Variants | undefined; if (selectedBulbType === undefined || !Object.values(Variants).includes(selectedBulbType)) { throw new BadRequestException(`Incorrect lamp type was provided.`); @@ -374,7 +412,10 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { } // 1) Type of need - const typeOfNeedResponses = requirementResponses.filter(({ requirement }) => requirement.id.startsWith('01')); + const typeOfNeedResponses = LightingEquipmentAndElectricLamps.getResponsesForCriterion( + requirementResponses, + Criteria.TypeOfNeed + ); const typeOfNeedResponsesIsConsistent = typeOfNeedResponses.every(({ requirement }) => { return typeOfNeedResponses[0].requirement.id.slice(2, 4) === requirement.id.slice(2, 4); @@ -665,11 +706,11 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { } // 3) Bulb lifetime - const modeOfUse = this.tryGetModeOfUse(requirementResponses, '04'); + const modeOfUse = LightingEquipmentAndElectricLamps.tryGetModeOfUse(requirementResponses, Criteria.ModeOfUse); if (modeOfUse) { const { hoursInDay, daysInWeek } = modeOfUse; - const tariff = this.tryGetTariff(requirementResponses, '05'); + const tariff = LightingEquipmentAndElectricLamps.tryGetTariff(requirementResponses, Criteria.Tariff); (Object.keys(availableBulbTypes) as Variants[]).forEach((bulbType) => { const { quantity, power } = availableBulbTypes[bulbType]; @@ -725,7 +766,8 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { (Object.keys(availableBulbTypes) as Variants[]).forEach((bulbType) => { availableBulbTypes[bulbType].eeClass = LightingEquipmentAndElectricLamps.calculateEnergyEfficiencyClass( - availableBulbTypes[bulbType].eei + availableBulbTypes[bulbType].eei, + LightingEquipmentAndElectricLamps.getLightFlowType(requirementResponses, Criteria.LightFlowType) ); }); diff --git a/src/do/entity/algorithm-engine.ts b/src/do/entity/algorithm-engine.ts index 508175b..2a78ecb 100644 --- a/src/do/entity/algorithm-engine.ts +++ b/src/do/entity/algorithm-engine.ts @@ -12,35 +12,20 @@ interface ModeOfUse { export abstract class AlgorithmEngine { public readonly categoryId: string; - protected tryGetTariff(requirementResponses: RequirementResponse[], criterionNumber: string): number | void { - const tariffResponses = requirementResponses.filter(({ requirement }) => { + protected static getResponsesForCriterion( + requirementResponses: RequirementResponse[], + criterionNumber: string + ): RequirementResponse[] { + return requirementResponses.filter(({ requirement }) => { return requirement.id.startsWith(criterionNumber); }); - - if (tariffResponses.length !== 1) { - throw new BadRequestException(`Incorrect tariffs information provided.`); - } - - const tariffValue = tariffResponses[0].value; - const requirementReferenceId = tariffResponses[0].requirement.id; - - if ( - !['number', 'boolean'].includes(typeof tariffValue) || - (requirementReferenceId === '0401010000' && (typeof tariffValue !== 'number' || tariffValue <= 0)) || - (requirementReferenceId === '0402010000' && (typeof tariffValue !== 'boolean' || !tariffValue)) - ) { - throw new BadRequestException(`Requirement responses for tariffs are not valid.`); - } - - if (typeof tariffValue === 'number') { - return tariffValue; - } } - protected tryGetModeOfUse(requirementResponses: RequirementResponse[], criterionNumber: string): ModeOfUse | void { - const modeOfUseResponses = requirementResponses.filter(({ requirement }) => { - return requirement.id.startsWith(criterionNumber); - }); + protected static tryGetModeOfUse( + requirementResponses: RequirementResponse[], + criterionNumber: string + ): ModeOfUse | void { + const modeOfUseResponses = this.getResponsesForCriterion(requirementResponses, criterionNumber); if (modeOfUseResponses.length === 0) { throw new BadRequestException(`Mode of use responses must be provided.`); @@ -72,6 +57,30 @@ export abstract class AlgorithmEngine { } } + protected static tryGetTariff(requirementResponses: RequirementResponse[], criterionNumber: string): number | void { + const tariffResponses = this.getResponsesForCriterion(requirementResponses, criterionNumber); + + if (tariffResponses.length !== 1) { + throw new BadRequestException(`Incorrect tariffs information provided.`); + } + + const tariffValue = tariffResponses[0].value; + const requirementReferenceId = tariffResponses[0].requirement.id; + + if ( + !['number', 'boolean'].includes(typeof tariffValue) || + (requirementReferenceId === `${criterionNumber}01010000` && + (typeof tariffValue !== 'number' || tariffValue <= 0)) || + (requirementReferenceId === `${criterionNumber}02010000` && (typeof tariffValue !== 'boolean' || !tariffValue)) + ) { + throw new BadRequestException(`Requirement responses for tariffs are not valid.`); + } + + if (typeof tariffValue === 'number') { + return tariffValue; + } + } + public abstract getCalculation(payload: CalculationPayload): Promise; public abstract getSpecification(payload: SpecificationPayload): SpecificationResponse; From 141e241b8a0696bca5bf17b612ac00115919ccfe Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Thu, 24 Dec 2020 16:18:37 +0200 Subject: [PATCH 7/9] chore(release): 0.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7ab914..fe8c07f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bulb-project-api", - "version": "0.5.0", + "version": "0.6.0", "description": "API Service for Bulb Project", "author": "uStudio Front-End Department", "license": "MIT", From 9af3937cc8bd5f1067568a9b35141322098c81ed Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Thu, 29 Jul 2021 16:09:44 +0300 Subject: [PATCH 8/9] feat(do): update bulbs specification requirements' titles --- src/do/algorithms/categories/31500000-1.ts | 116 ++++++++++----------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/do/algorithms/categories/31500000-1.ts b/src/do/algorithms/categories/31500000-1.ts index 0c7a52c..6d35af6 100644 --- a/src/do/algorithms/categories/31500000-1.ts +++ b/src/do/algorithms/categories/31500000-1.ts @@ -882,15 +882,15 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { }; enum Functionality { - RatedLifetime = 'Rated lifetime', - LumenMaintenance = 'Lumen maintenance', - SwitchingCycle = 'Switching cycle', - StartingTime = 'Starting time', - WarmUp = 'Warm up', - PrematureFailure = 'Premature failure rate', - PowerFactor = 'Power factor', - ColourRendering = 'Colour rendering (Ra)', - SurvivalFactor = 'Survival factor', + RatedLifetime = 'Номінальний термін служби ламп', + LumenMaintenance = 'Збереження світловіддачі', + SwitchingCycle = 'Кількість циклів вимикання перед виходом з ладу', + StartingTime = 'Час запуску', + WarmUp = 'Час розігрівання лампи', + PrematureFailure = 'Відсоток передчасного виходу з ладу', + PowerFactor = 'Коефіцієнт потужності', + ColourRendering = 'Кольоропередача', + SurvivalFactor = 'Коефіцієнт довговічності лампи', } switch (relatedItem) { @@ -905,11 +905,11 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { minValue: 2000, unit: { id: '', - name: 'h', + name: 'год', }, }, { - title: `${Functionality.LumenMaintenance} at 75% of rated average lifetime`, + title: `${Functionality.LumenMaintenance} при 75% номінального середнього терміна служби ламп`, dataType: 'integer', minValue: 85, unit: { @@ -928,20 +928,20 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { maxValue: 0.2, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.WarmUp} to 60% of lumenus flux`, + title: `${Functionality.WarmUp} до 60% Ф`, dataType: 'number', maxValue: 1, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.PrematureFailure} at 200 h`, + title: `${Functionality.PrematureFailure} при 200 год`, dataType: 'number', maxValue: 5, unit: { @@ -970,11 +970,11 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { minValue: 2000, unit: { id: '', - name: 'h', + name: 'год', }, }, { - title: `${Functionality.LumenMaintenance} at 75% of rated average lifetime`, + title: `${Functionality.LumenMaintenance} при 75% номінального середнього терміна служби ламп`, dataType: 'integer', minValue: 80, unit: { @@ -993,20 +993,20 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { maxValue: 0.2, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.WarmUp} to 60% of lumenus flux`, + title: `${Functionality.WarmUp} до 60% Ф`, dataType: 'number', maxValue: 1, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.PrematureFailure} at 200 h`, + title: `${Functionality.PrematureFailure} при 200 год`, dataType: 'number', maxValue: 5, unit: { @@ -1038,11 +1038,11 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { minValue: 2000, unit: { id: '', - name: 'h', + name: 'год', }, }, { - title: `${Functionality.LumenMaintenance} at 75% of rated average lifetime`, + title: `${Functionality.LumenMaintenance} при 75% номінального середнього терміна служби ламп`, dataType: 'integer', minValue: 85, unit: { @@ -1061,20 +1061,20 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { maxValue: 0.2, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.WarmUp} to 60% of lumenus flux`, + title: `${Functionality.WarmUp} до 60% Ф`, dataType: 'number', maxValue: 1, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.PrematureFailure} at 200 h`, + title: `${Functionality.PrematureFailure} при 200 год`, dataType: 'number', maxValue: 5, unit: { @@ -1103,11 +1103,11 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { minValue: 2000, unit: { id: '', - name: 'h', + name: 'год', }, }, { - title: `${Functionality.LumenMaintenance} at 75% of rated average lifetime`, + title: `${Functionality.LumenMaintenance} при 75% номінального середнього терміна служби ламп`, dataType: 'integer', minValue: 80, unit: { @@ -1126,20 +1126,20 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { maxValue: 0.2, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.WarmUp} to 60% of lumenus flux`, + title: `${Functionality.WarmUp} до 60% Ф`, dataType: 'number', maxValue: 1, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.PrematureFailure} at 200 h`, + title: `${Functionality.PrematureFailure} при 200 год`, dataType: 'number', maxValue: 5, unit: { @@ -1166,12 +1166,12 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { functionalityRequirementGroup.requirements.push( ...([ { - title: `${Functionality.SurvivalFactor} at 6000 h`, + title: `${Functionality.SurvivalFactor} при 6000 год`, dataType: 'number', minValue: 0.7, }, { - title: `${Functionality.LumenMaintenance} at 2000 h`, + title: `${Functionality.LumenMaintenance} при 2000 год`, dataType: 'integer', minValue: 88, unit: { @@ -1180,7 +1180,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { }, }, { - title: `${Functionality.LumenMaintenance} at 6000 h`, + title: `${Functionality.LumenMaintenance} при 6000 год`, dataType: 'integer', minValue: 70, unit: { @@ -1194,7 +1194,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { minValue: 30000, unit: { id: '', - name: 'h', + name: 'год', }, }, { @@ -1203,20 +1203,20 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { maxValue: power >= 10 ? 1 : 1.5, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.WarmUp} to 60% of lumenus flux`, + title: `${Functionality.WarmUp} до 60% Ф`, dataType: 'integer', maxValue: 40, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.PrematureFailure} at 400 h`, + title: `${Functionality.PrematureFailure} при 400 год`, dataType: 'integer', maxValue: 2, unit: { @@ -1225,7 +1225,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { }, }, { - title: 'UVA + UVB radiation', + title: 'Випромінення UVA + UVB', dataType: 'integer', maxValue: 2, unit: { @@ -1234,7 +1234,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { }, }, { - title: 'UVC radiation', + title: 'Випромінення UVC', dataType: 'number', maxValue: 0.01, unit: { @@ -1267,12 +1267,12 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { functionalityRequirementGroup.requirements.push( ...([ { - title: `${Functionality.SurvivalFactor} at 6000 h`, + title: `${Functionality.SurvivalFactor} при 6000 год`, dataType: 'number', minValue: 0.7, }, { - title: `${Functionality.LumenMaintenance} at 2000 h`, + title: `${Functionality.LumenMaintenance} при 2000 год`, dataType: 'integer', minValue: 83, unit: { @@ -1281,7 +1281,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { }, }, { - title: `${Functionality.LumenMaintenance} at 6000 h`, + title: `${Functionality.LumenMaintenance} при 6000 год`, dataType: 'integer', minValue: 70, unit: { @@ -1295,7 +1295,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { minValue: 30000, unit: { id: '', - name: 'h', + name: 'год', }, }, { @@ -1304,20 +1304,20 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { maxValue: power >= 10 ? 1 : 1.5, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.WarmUp} to 60% of lumenus flux`, + title: `${Functionality.WarmUp} до 60% Ф`, dataType: 'integer', maxValue: 40, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.PrematureFailure} at 1000 h`, + title: `${Functionality.PrematureFailure} при 1000 год`, dataType: 'integer', maxValue: 5, unit: { @@ -1352,12 +1352,12 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { functionalityRequirementGroup.requirements.push( ...([ { - title: `${Functionality.SurvivalFactor} at 6000 h`, + title: `${Functionality.SurvivalFactor} при 6000 год`, dataType: 'number', minValue: 0.9, }, { - title: `${Functionality.LumenMaintenance} at 6000 h`, + title: `${Functionality.LumenMaintenance} при 6000 год`, dataType: 'integer', minValue: 80, unit: { @@ -1371,7 +1371,7 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { minValue: techChars[Variants.LED].timeRate / 2, unit: { id: '', - name: 'h', + name: 'год', }, }, { @@ -1380,20 +1380,20 @@ export class LightingEquipmentAndElectricLamps extends AlgorithmEngine { maxValue: 0.5, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.WarmUp} to 95% of lumenus flux`, + title: `${Functionality.WarmUp} до 95% Ф`, dataType: 'number', maxValue: 2, unit: { id: '', - name: 's', + name: 'сек', }, }, { - title: `${Functionality.PrematureFailure} at 1000 h`, + title: `${Functionality.PrematureFailure} при 1000 год`, dataType: 'integer', maxValue: 5, unit: { From ecf167ca452fbe3b9ff70978adae45ba3f9f84ce Mon Sep 17 00:00:00 2001 From: drizzer14 Date: Thu, 29 Jul 2021 16:10:09 +0300 Subject: [PATCH 9/9] chore(release): 0.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fe8c07f..46d7282 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bulb-project-api", - "version": "0.6.0", + "version": "0.7.0", "description": "API Service for Bulb Project", "author": "uStudio Front-End Department", "license": "MIT",