Corrección de error en dealer: active => actived
This commit is contained in:
parent
9d2f8053ae
commit
19f84f4fde
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@uecko-presupuestador/server",
|
"name": "@uecko-presupuestador/server",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"author": "Rodax Software <dev@rodax-software.com>",
|
"author": "Rodax Software <dev@rodax-software.com>",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
import Joi from "joi";
|
import Joi from "joi";
|
||||||
|
|
||||||
export enum DEALER_STATUS {
|
export enum DEALER_STATUS {
|
||||||
ACTIVE = "active",
|
ACTIVED = "actived",
|
||||||
BLOQUED = "bloqued",
|
BLOQUED = "bloqued",
|
||||||
DISABLED = "disabled",
|
DISABLED = "disabled",
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ export class DealerStatus extends ValueObject<string> {
|
|||||||
|
|
||||||
protected static validate(value: string, options: IValueObjectOptions) {
|
protected static validate(value: string, options: IValueObjectOptions) {
|
||||||
const rule = Joi.string()
|
const rule = Joi.string()
|
||||||
.valid(DEALER_STATUS.ACTIVE, DEALER_STATUS.BLOQUED, DEALER_STATUS.DISABLED)
|
.valid(DEALER_STATUS.ACTIVED, DEALER_STATUS.BLOQUED, DEALER_STATUS.DISABLED)
|
||||||
.label(options.label ? options.label : "status");
|
.label(options.label ? options.label : "status");
|
||||||
|
|
||||||
return RuleValidator.validate<string>(rule, value);
|
return RuleValidator.validate<string>(rule, value);
|
||||||
@ -30,8 +30,8 @@ export class DealerStatus extends ValueObject<string> {
|
|||||||
return String(status).trim().toLowerCase();
|
return String(status).trim().toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static createActive(): DealerStatus {
|
public static createActived(): DealerStatus {
|
||||||
return new DealerStatus(DEALER_STATUS.ACTIVE);
|
return new DealerStatus(DEALER_STATUS.ACTIVED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static createBloqued(): DealerStatus {
|
public static createBloqued(): DealerStatus {
|
||||||
@ -70,8 +70,8 @@ export class DealerStatus extends ValueObject<string> {
|
|||||||
return this.toString();
|
return this.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public isActive(): boolean {
|
public isActived(): boolean {
|
||||||
return this.equals(DealerStatus.createActive());
|
return this.equals(DealerStatus.createActived());
|
||||||
}
|
}
|
||||||
|
|
||||||
public isBloqued(): boolean {
|
public isBloqued(): boolean {
|
||||||
|
|||||||
@ -128,7 +128,7 @@ export const initializeSampleDealer = async (
|
|||||||
name: Name.create(config.sample_dealer.name).object,
|
name: Name.create(config.sample_dealer.name).object,
|
||||||
user_id: user.id,
|
user_id: user.id,
|
||||||
language: Language.createDefaultCode().object,
|
language: Language.createDefaultCode().object,
|
||||||
status: DealerStatus.createActive(),
|
status: DealerStatus.createActived(),
|
||||||
currency: CurrencyData.createDefaultCode().object,
|
currency: CurrencyData.createDefaultCode().object,
|
||||||
additionalInfo: additionalInfoOrError.object,
|
additionalInfo: additionalInfoOrError.object,
|
||||||
logo: DealerLogotype.create("").object,
|
logo: DealerLogotype.create("").object,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user