feat(medusa,types): create promotion flows (#7029)

* chore: create promotion phase

* chore: fix specs + minor ui changes

* chore: minor fixes

* chore: added changeset

* address pr reviews

* chore: fix spec

* Update packages/admin-next/dashboard/src/v2-routes/promotions/common/edit-rules/edit-rules.tsx

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>

* chore: fix specs

---------

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
This commit is contained in:
Riqwan Thamir
2024-04-23 12:08:39 +02:00
committed by GitHub
parent b61dcb84c9
commit 93ef94cad3
37 changed files with 1807 additions and 569 deletions

View File

@@ -29,7 +29,7 @@ import {
const PROMOTIONS_QUERY_KEY = "promotions" as const
export const promotionsQueryKeys = {
...queryKeysFactory(PROMOTIONS_QUERY_KEY),
listRules: (id: string, ruleType: string) => [
listRules: (id: string | null, ruleType: string) => [
PROMOTIONS_QUERY_KEY,
id,
ruleType,
@@ -60,7 +60,7 @@ export const usePromotion = (
}
export const usePromotionRules = (
id: string,
id: string | null,
ruleType: string,
options?: Omit<
UseQueryOptions<