revert(checkout): keep tenant editing policy contract
This commit is contained in:
@@ -10,14 +10,6 @@ export interface CartEditingPolicy {
|
|||||||
allow_update_variant: boolean;
|
allow_update_variant: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CheckoutEditingPolicy extends CartEditingPolicy {
|
|
||||||
code: 'disabled';
|
|
||||||
allow_modify: false;
|
|
||||||
allow_delete: false;
|
|
||||||
allow_update_quantity: false;
|
|
||||||
allow_update_variant: false;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface BankAccount {
|
export interface BankAccount {
|
||||||
id: number;
|
id: number;
|
||||||
tenant_code: string;
|
tenant_code: string;
|
||||||
@@ -148,7 +140,7 @@ export interface Tenant {
|
|||||||
display_seach_bar?: boolean;
|
display_seach_bar?: boolean;
|
||||||
display_cart?: boolean;
|
display_cart?: boolean;
|
||||||
cart_editing_policy?: CartEditingPolicy;
|
cart_editing_policy?: CartEditingPolicy;
|
||||||
checkout_editing_policy?: CheckoutEditingPolicy;
|
checkout_editing_policy?: CartEditingPolicy;
|
||||||
display_cart_item_images?: boolean;
|
display_cart_item_images?: boolean;
|
||||||
social_media?: SocialMedia[];
|
social_media?: SocialMedia[];
|
||||||
menues?: Menu[];
|
menues?: Menu[];
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { CatalogService } from '../../../../core/services/catalog/catalog.servic
|
|||||||
import { GlobalLoadingService } from '../../../../core/services/global-loading/global-loading.service';
|
import { GlobalLoadingService } from '../../../../core/services/global-loading/global-loading.service';
|
||||||
import { TenantService } from '../../../../core/services/tenant.service';
|
import { TenantService } from '../../../../core/services/tenant.service';
|
||||||
import { ToastService } from '../../../../core/services/toast.service';
|
import { ToastService } from '../../../../core/services/toast.service';
|
||||||
import { CheckoutEditingPolicy } from '../../../../core/services/tenant.interface';
|
import { CartEditingPolicy } from '../../../../core/services/tenant.interface';
|
||||||
import { CheckoutPageComponent } from './checkout-page.component';
|
import { CheckoutPageComponent } from './checkout-page.component';
|
||||||
|
|
||||||
describe('CheckoutPageComponent payment validation', () => {
|
describe('CheckoutPageComponent payment validation', () => {
|
||||||
@@ -43,7 +43,7 @@ describe('CheckoutPageComponent payment validation', () => {
|
|||||||
let tenantState: ReturnType<
|
let tenantState: ReturnType<
|
||||||
typeof signal<{
|
typeof signal<{
|
||||||
codigo: string;
|
codigo: string;
|
||||||
checkout_editing_policy?: CheckoutEditingPolicy;
|
checkout_editing_policy?: CartEditingPolicy;
|
||||||
}>
|
}>
|
||||||
>;
|
>;
|
||||||
|
|
||||||
@@ -104,11 +104,11 @@ describe('CheckoutPageComponent payment validation', () => {
|
|||||||
tenantState = signal({
|
tenantState = signal({
|
||||||
codigo: 'tenant-test',
|
codigo: 'tenant-test',
|
||||||
checkout_editing_policy: {
|
checkout_editing_policy: {
|
||||||
code: 'disabled',
|
code: 'full',
|
||||||
allow_modify: false,
|
allow_modify: true,
|
||||||
allow_delete: false,
|
allow_delete: true,
|
||||||
allow_update_quantity: false,
|
allow_update_quantity: true,
|
||||||
allow_update_variant: false,
|
allow_update_variant: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user