feat(dashboard,types,promotion,medusa): hide fields on promotions depending on templates (#7746)
**what:** - hides different fields depending on the chosen template - remove operator values API - fixes to edit promotion rules - make currency optional for promotion RESOLVES CORE-2297
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20240617102917 extends Migration {
|
||||
async up(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table "promotion_application_method" alter column "currency_code" type text using ("currency_code"::text);'
|
||||
)
|
||||
|
||||
this.addSql(
|
||||
'alter table "promotion_application_method" alter column "currency_code" drop not null;'
|
||||
)
|
||||
}
|
||||
|
||||
async down(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table "promotion_application_method" alter column "currency_code" type text using ("currency_code"::text);'
|
||||
)
|
||||
this.addSql(
|
||||
'alter table "promotion_application_method" alter column "currency_code" set not null;'
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ export interface CreateApplicationMethodDTO {
|
||||
target_type: ApplicationMethodTargetTypeValues
|
||||
allocation?: ApplicationMethodAllocationValues
|
||||
value?: BigNumberInput
|
||||
currency_code: string
|
||||
currency_code?: string | null
|
||||
promotion: Promotion | string | PromotionDTO
|
||||
max_quantity?: BigNumberInput | null
|
||||
buy_rules_min_quantity?: BigNumberInput | null
|
||||
@@ -26,7 +26,7 @@ export interface UpdateApplicationMethodDTO {
|
||||
target_type?: ApplicationMethodTargetTypeValues
|
||||
allocation?: ApplicationMethodAllocationValues
|
||||
value?: BigNumberInput
|
||||
currency_code?: string
|
||||
currency_code?: string | null
|
||||
promotion?: Promotion | string | PromotionDTO
|
||||
max_quantity?: BigNumberInput | null
|
||||
buy_rules_min_quantity?: BigNumberInput | null
|
||||
|
||||
Reference in New Issue
Block a user