Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ConfigurableOperationMultiSelector } from '@/vdb/components/shared/configurable-operation-multi-selector.js';
import { configurableOperationDefFragment } from '@/vdb/graphql/fragments.js';
import { graphql } from '@/vdb/graphql/graphql.js';
import { useLingui } from '@lingui/react/macro';
import { ConfigurableOperationInput as ConfigurableOperationInputType } from '@vendure/common/lib/generated-types';

export const promotionActionsDocument = graphql(
Expand All @@ -25,15 +26,16 @@ export function PromotionActionsSelector({
onChange,
onValidityChange,
}: Readonly<PromotionActionsSelectorProps>) {
const { t } = useLingui();
return (
<ConfigurableOperationMultiSelector
value={value}
onChange={onChange}
queryDocument={promotionActionsDocument}
queryKey="promotionActions"
dataPath="promotionActions"
buttonText="Add action"
dropdownTitle="Available Actions"
buttonText={t`Add action`}
dropdownTitle={t`Available Actions`}
showEnhancedDropdown={true}
onValidityChange={onValidityChange}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ConfigurableOperationMultiSelector } from '@/vdb/components/shared/configurable-operation-multi-selector.js';
import { configurableOperationDefFragment } from '@/vdb/graphql/fragments.js';
import { graphql } from '@/vdb/graphql/graphql.js';
import { useLingui } from '@lingui/react/macro';
import { ConfigurableOperationInput as ConfigurableOperationInputType } from '@vendure/common/lib/generated-types';

export const promotionConditionsDocument = graphql(
Expand All @@ -25,15 +26,16 @@ export function PromotionConditionsSelector({
onChange,
onValidityChange,
}: Readonly<PromotionConditionsSelectorProps>) {
const { t } = useLingui();
return (
<ConfigurableOperationMultiSelector
value={value}
onChange={onChange}
queryDocument={promotionConditionsDocument}
queryKey="promotionConditions"
dataPath="promotionConditions"
buttonText="Add condition"
dropdownTitle="Available Conditions"
buttonText={t`Add condition`}
dropdownTitle={t`Available Conditions`}
showEnhancedDropdown={true}
onValidityChange={onValidityChange}
/>
Expand Down
23 changes: 21 additions & 2 deletions packages/dashboard/src/i18n/locales/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,10 @@ msgstr "طلب مسودة"
msgid "Scope"
msgstr "النطاق"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:37
msgid "Add condition"
msgstr "إضافة شرط"

#: src/app/routes/_authenticated/_shipping-methods/components/test-single-method-result.tsx:58
msgid "Shipping method is eligible for this order"
msgstr "طريقة الشحن مؤهلة لهذا الطلب"
Expand Down Expand Up @@ -1289,8 +1293,6 @@ msgid "{cancellableCount, plural, one {Cancel {cancellableCount} job} other {Can
msgstr ""

#: src/lib/components/data-input/product-multi-selector-input.tsx:499
#: src/lib/components/shared/configurable-operation-multi-selector.tsx:265
#: src/lib/components/shared/configurable-operation-selector.tsx:140
msgid "{buttonText}"
msgstr "{buttonText}"

Expand Down Expand Up @@ -3475,6 +3477,10 @@ msgstr "إدارة العلامات"
msgid "Items refunded"
msgstr "العناصر المستردة"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:37
msgid "Add action"
msgstr "إضافة إجراء"

#: src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx:325
#~ msgid "Assign options to existing variant"
#~ msgstr "تعيين خيارات إلى الشكل الموجود"
Expand Down Expand Up @@ -4141,6 +4147,10 @@ msgstr "مسؤول عام"
#~ msgid "Some resources are down"
#~ msgstr "بعض الموارد معطلة"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:38
msgid "Available Actions"
msgstr "الإجراءات المتاحة"

#. placeholder {0}: error.message
#: src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx:143
msgid "Failed to update order line: {0}"
Expand Down Expand Up @@ -5172,6 +5182,11 @@ msgstr "اللغة الافتراضية"
msgid "Status"
msgstr "الحالة"

#: src/lib/components/shared/configurable-operation-multi-selector.tsx:298
#: src/lib/components/shared/configurable-operation-selector.tsx:155
msgid "No options found"
msgstr "لم يتم العثور على خيارات"

#: src/lib/components/shared/asset/asset-gallery.tsx:370
#: src/lib/components/shared/asset/asset-gallery.tsx:382
msgid "Binary"
Expand Down Expand Up @@ -5896,6 +5911,10 @@ msgstr "لا توجد نتيجة بعد"
msgid "Payment settled"
msgstr "تم تسوية الدفع"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:38
msgid "Available Conditions"
msgstr "الشروط المتاحة"

#: src/lib/components/data-table/data-table-active-filters-popover.tsx:27
msgid "Active filters"
msgstr "عوامل التصفية النشطة"
Expand Down
23 changes: 21 additions & 2 deletions packages/dashboard/src/i18n/locales/bg.po
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,10 @@ msgstr "Чернова на поръчка"
msgid "Scope"
msgstr "Обхват"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:37
msgid "Add condition"
msgstr "Добавяне на условие"

#: src/app/routes/_authenticated/_shipping-methods/components/test-single-method-result.tsx:58
msgid "Shipping method is eligible for this order"
msgstr "Методът на доставка отговаря на условията за тази поръчка"
Expand Down Expand Up @@ -1295,8 +1299,6 @@ msgid "{cancellableCount, plural, one {Cancel {cancellableCount} job} other {Can
msgstr ""

#: src/lib/components/data-input/product-multi-selector-input.tsx:499
#: src/lib/components/shared/configurable-operation-multi-selector.tsx:265
#: src/lib/components/shared/configurable-operation-selector.tsx:140
msgid "{buttonText}"
msgstr "{buttonText}"

Expand Down Expand Up @@ -3495,6 +3497,10 @@ msgstr "Управление на етикети"
msgid "Items refunded"
msgstr "Възстановени артикули"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:37
msgid "Add action"
msgstr "Добавяне на действие"

#: src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx:325
#~ msgid "Assign options to existing variant"
#~ msgstr "Присвояване на опции към съществуващ вариант"
Expand Down Expand Up @@ -4164,6 +4170,10 @@ msgstr "Супер администратор"
#~ msgid "Some resources are down"
#~ msgstr "Някои ресурси не работят"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:38
msgid "Available Actions"
msgstr "Налични действия"

#. placeholder {0}: error.message
#: src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx:143
msgid "Failed to update order line: {0}"
Expand Down Expand Up @@ -5201,6 +5211,11 @@ msgstr "Език по подразбиране"
msgid "Status"
msgstr "Статус"

#: src/lib/components/shared/configurable-operation-multi-selector.tsx:298
#: src/lib/components/shared/configurable-operation-selector.tsx:155
msgid "No options found"
msgstr "Не са намерени опции"

#: src/lib/components/shared/asset/asset-gallery.tsx:370
#: src/lib/components/shared/asset/asset-gallery.tsx:382
msgid "Binary"
Expand Down Expand Up @@ -5933,6 +5948,10 @@ msgstr "Все още няма резултат"
msgid "Payment settled"
msgstr "Плащането е приключено"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:38
msgid "Available Conditions"
msgstr "Налични условия"

#: src/lib/components/data-table/data-table-active-filters-popover.tsx:27
msgid "Active filters"
msgstr "Активни филтри"
Expand Down
23 changes: 21 additions & 2 deletions packages/dashboard/src/i18n/locales/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,10 @@ msgstr "Koncept objednávky"
msgid "Scope"
msgstr "Rozsah"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:37
msgid "Add condition"
msgstr "Přidat podmínku"

#: src/app/routes/_authenticated/_shipping-methods/components/test-single-method-result.tsx:58
msgid "Shipping method is eligible for this order"
msgstr "Způsob dopravy je vhodný pro tuto objednávku"
Expand Down Expand Up @@ -1289,8 +1293,6 @@ msgid "{cancellableCount, plural, one {Cancel {cancellableCount} job} other {Can
msgstr "{cancellableCount, plural, one {Zrušit {cancellableCount} úlohu} few {Zrušit {cancellableCount} úlohy} other {Zrušit {cancellableCount} úloh}}"

#: src/lib/components/data-input/product-multi-selector-input.tsx:499
#: src/lib/components/shared/configurable-operation-multi-selector.tsx:265
#: src/lib/components/shared/configurable-operation-selector.tsx:140
msgid "{buttonText}"
msgstr "{buttonText}"

Expand Down Expand Up @@ -3475,6 +3477,10 @@ msgstr "Spravovat štítky"
msgid "Items refunded"
msgstr "Položky vráceny"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:37
msgid "Add action"
msgstr "Přidat akci"

#: src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx:325
#~ msgid "Assign options to existing variant"
#~ msgstr "Přiřadit volby existující variantě"
Expand Down Expand Up @@ -4141,6 +4147,10 @@ msgstr "Super Admin"
#~ msgid "Some resources are down"
#~ msgstr "Některé zdroje nefungují"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:38
msgid "Available Actions"
msgstr "Dostupné akce"

#. placeholder {0}: error.message
#: src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx:143
msgid "Failed to update order line: {0}"
Expand Down Expand Up @@ -5172,6 +5182,11 @@ msgstr "Výchozí jazyk"
msgid "Status"
msgstr "Stav"

#: src/lib/components/shared/configurable-operation-multi-selector.tsx:298
#: src/lib/components/shared/configurable-operation-selector.tsx:155
msgid "No options found"
msgstr "Nebyly nalezeny žádné možnosti"

#: src/lib/components/shared/asset/asset-gallery.tsx:370
#: src/lib/components/shared/asset/asset-gallery.tsx:382
msgid "Binary"
Expand Down Expand Up @@ -5896,6 +5911,10 @@ msgstr "Zatím žádný výsledek"
msgid "Payment settled"
msgstr "Platba vypořádána"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:38
msgid "Available Conditions"
msgstr "Dostupné podmínky"

#: src/lib/components/data-table/data-table-active-filters-popover.tsx:27
msgid "Active filters"
msgstr "Aktivní filtry"
Expand Down
23 changes: 21 additions & 2 deletions packages/dashboard/src/i18n/locales/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,10 @@ msgstr "Entwurfsbestellung"
msgid "Scope"
msgstr "Geltungsbereich"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:37
msgid "Add condition"
msgstr "Bedingung hinzufügen"

#: src/app/routes/_authenticated/_shipping-methods/components/test-single-method-result.tsx:58
msgid "Shipping method is eligible for this order"
msgstr "Versandmethode ist für diese Bestellung berechtigt"
Expand Down Expand Up @@ -1289,8 +1293,6 @@ msgid "{cancellableCount, plural, one {Cancel {cancellableCount} job} other {Can
msgstr ""

#: src/lib/components/data-input/product-multi-selector-input.tsx:499
#: src/lib/components/shared/configurable-operation-multi-selector.tsx:265
#: src/lib/components/shared/configurable-operation-selector.tsx:140
msgid "{buttonText}"
msgstr "{buttonText}"

Expand Down Expand Up @@ -3475,6 +3477,10 @@ msgstr "Tags verwalten"
msgid "Items refunded"
msgstr "Artikel erstattet"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:37
msgid "Add action"
msgstr "Aktion hinzufügen"

#: src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx:325
#~ msgid "Assign options to existing variant"
#~ msgstr "Optionen zu bestehender Variante zuweisen"
Expand Down Expand Up @@ -4141,6 +4147,10 @@ msgstr "Super Admin"
#~ msgid "Some resources are down"
#~ msgstr "Einige Ressourcen sind nicht verfügbar"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:38
msgid "Available Actions"
msgstr "Verfügbare Aktionen"

#. placeholder {0}: error.message
#: src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx:143
msgid "Failed to update order line: {0}"
Expand Down Expand Up @@ -5172,6 +5182,11 @@ msgstr "Standardsprache"
msgid "Status"
msgstr "Status"

#: src/lib/components/shared/configurable-operation-multi-selector.tsx:298
#: src/lib/components/shared/configurable-operation-selector.tsx:155
msgid "No options found"
msgstr "Keine Optionen gefunden"

#: src/lib/components/shared/asset/asset-gallery.tsx:370
#: src/lib/components/shared/asset/asset-gallery.tsx:382
msgid "Binary"
Expand Down Expand Up @@ -5896,6 +5911,10 @@ msgstr "Noch kein Ergebnis"
msgid "Payment settled"
msgstr "Zahlung abgerechnet"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:38
msgid "Available Conditions"
msgstr "Verfügbare Bedingungen"

#: src/lib/components/data-table/data-table-active-filters-popover.tsx:27
msgid "Active filters"
msgstr "Aktive Filter"
Expand Down
23 changes: 21 additions & 2 deletions packages/dashboard/src/i18n/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,10 @@ msgstr "Draft order"
msgid "Scope"
msgstr "Scope"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:37
msgid "Add condition"
msgstr "Add condition"

#: src/app/routes/_authenticated/_shipping-methods/components/test-single-method-result.tsx:58
msgid "Shipping method is eligible for this order"
msgstr "Shipping method is eligible for this order"
Expand Down Expand Up @@ -1289,8 +1293,6 @@ msgid "{cancellableCount, plural, one {Cancel {cancellableCount} job} other {Can
msgstr "{cancellableCount, plural, one {Cancel {cancellableCount} job} other {Cancel {cancellableCount} jobs}}"

#: src/lib/components/data-input/product-multi-selector-input.tsx:499
#: src/lib/components/shared/configurable-operation-multi-selector.tsx:265
#: src/lib/components/shared/configurable-operation-selector.tsx:140
msgid "{buttonText}"
msgstr "{buttonText}"

Expand Down Expand Up @@ -3475,6 +3477,10 @@ msgstr "Manage Tags"
msgid "Items refunded"
msgstr "Items refunded"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:37
msgid "Add action"
msgstr "Add action"

#: src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx:325
#~ msgid "Assign options to existing variant"
#~ msgstr "Assign options to existing variant"
Expand Down Expand Up @@ -4141,6 +4147,10 @@ msgstr "Super Admin"
#~ msgid "Some resources are down"
#~ msgstr "Some resources are down"

#: src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx:38
msgid "Available Actions"
msgstr "Available Actions"

#. placeholder {0}: error.message
#: src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx:143
msgid "Failed to update order line: {0}"
Expand Down Expand Up @@ -5172,6 +5182,11 @@ msgstr "Default language"
msgid "Status"
msgstr "Status"

#: src/lib/components/shared/configurable-operation-multi-selector.tsx:298
#: src/lib/components/shared/configurable-operation-selector.tsx:155
msgid "No options found"
msgstr "No options found"

#: src/lib/components/shared/asset/asset-gallery.tsx:370
#: src/lib/components/shared/asset/asset-gallery.tsx:382
msgid "Binary"
Expand Down Expand Up @@ -5896,6 +5911,10 @@ msgstr "No result yet"
msgid "Payment settled"
msgstr "Payment settled"

#: src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx:38
msgid "Available Conditions"
msgstr "Available Conditions"

#: src/lib/components/data-table/data-table-active-filters-popover.tsx:27
msgid "Active filters"
msgstr "Active filters"
Expand Down
Loading
Loading