Alterado end point api/v1/delivery/schedule para mostrar a capacidade e saldo da capacidade com 3 casas decimais e criado peso adicional para mostrar a data de entrega na abertura da venda
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
export class Flunt {
|
||||
constructor(public errors: any[] = [])
|
||||
{}
|
||||
|
||||
isRequired(value, message){
|
||||
if (!value || value.length <= 0) {
|
||||
this.errors.push(message);
|
||||
}
|
||||
}
|
||||
|
||||
hasMinLen( value, min, message) {
|
||||
if (!value || value.length <= min) {
|
||||
this.errors.push(message);
|
||||
}
|
||||
}
|
||||
|
||||
hasMaxLen( value, max, message) {
|
||||
if (!value || value.length >= max) {
|
||||
this.errors.push(message);
|
||||
}
|
||||
}
|
||||
|
||||
isValid(): boolean {
|
||||
return this.errors.length == 0;
|
||||
}
|
||||
|
||||
export class Flunt {
|
||||
constructor(public errors: any[] = [])
|
||||
{}
|
||||
|
||||
isRequired(value, message){
|
||||
if (!value || value.length <= 0) {
|
||||
this.errors.push(message);
|
||||
}
|
||||
}
|
||||
|
||||
hasMinLen( value, min, message) {
|
||||
if (!value || value.length <= min) {
|
||||
this.errors.push(message);
|
||||
}
|
||||
}
|
||||
|
||||
hasMaxLen( value, max, message) {
|
||||
if (!value || value.length >= max) {
|
||||
this.errors.push(message);
|
||||
}
|
||||
}
|
||||
|
||||
isValid(): boolean {
|
||||
return this.errors.length == 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
export class NumberUtils {
|
||||
|
||||
static getNewId(max: number, min: number) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
export class NumberUtils {
|
||||
|
||||
static getNewId(max: number, min: number) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user