feat(subscribe): Add 'sold' column to SubscribeTable and update inventory terminology

This commit is contained in:
web@ppanel 2025-01-13 21:54:49 +07:00
parent f408fdffae
commit 19619fdbe0
25 changed files with 78 additions and 50 deletions

View File

@ -56,7 +56,7 @@ interface SubscribeFormProps<T> {
}
const defaultValues = {
inventory: -1,
inventory: 0,
speed_limit: 0,
device_limit: 0,
traffic: 0,
@ -319,10 +319,10 @@ export default function SubscribeForm<T extends Record<string, any>>({
<FormLabel>{t('form.inventory')}</FormLabel>
<FormControl>
<EnhancedInput
placeholder={`-1 ${t('form.noLimit')}`}
placeholder={t('form.noLimit')}
type='number'
{...field}
min={-1}
value={field.value === -1 ? 0 : field.value}
min={0}
onValueChange={(value) => {
form.setValue(field.name, value);
}}

View File

@ -183,6 +183,11 @@ export default function SubscribeTable() {
return name ? <Badge variant='outline'>{name}</Badge> : '--';
},
},
{
accessorKey: 'sold',
header: t('sold'),
cell: ({ row }) => <Badge variant='default'>{row.getValue('sold')}</Badge>,
},
]}
actions={{
render: (row) => [

View File

@ -36,7 +36,7 @@
"discount_price": "Cena po slevě",
"duration": "Doba trvání (měsíce)",
"groupId": "Skupina předplatného",
"inventory": "Sklad",
"inventory": "Limit předplatného",
"monthlyReset": "Měsíční Reset",
"name": "Název",
"noLimit": "Bez omezení",
@ -86,12 +86,13 @@
"updateSuccess": "Úspěšně aktualizováno",
"updatedAt": "Čas aktualizace"
},
"inventory": "inventář",
"inventory": "Limit předplatného",
"name": "název",
"quota": "Limit na nákup/čas",
"replacement": "Obnovení ceny/krát",
"sell": "Prodej",
"show": "Zobrazit na hlavní stránce",
"sold": "Počet předplatných",
"subscribe": "Předplatit",
"subscribeGroup": "Přihlásit se ke skupině",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Rabattpreis",
"duration": "Dauer (Monate)",
"groupId": "Abonnementgruppe",
"inventory": "Bestand",
"inventory": "Abonnementslimit",
"monthlyReset": "Monatliches Zurücksetzen",
"name": "Name",
"noLimit": "Keine Begrenzung",
@ -86,12 +86,13 @@
"updateSuccess": "Erfolgreich aktualisiert",
"updatedAt": "Aktualisierungszeit"
},
"inventory": "Inventar",
"inventory": "Abonnementslimit",
"name": "Name",
"quota": "Kaufbeschränkung/pro Einkauf",
"replacement": "Preis pro Zurücksetzung",
"sell": "Verkauf",
"show": "Startseite anzeigen",
"sold": "Abonnentenzahl",
"subscribe": "Abonnieren",
"subscribeGroup": "Gruppe abonnieren",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Discount Price",
"duration": "Duration (months)",
"groupId": "Subscription Group",
"inventory": "Inventory",
"inventory": "Subscription Limit",
"monthlyReset": "Monthly Reset",
"name": "Name",
"noLimit": "No Limit",
@ -86,12 +86,13 @@
"updateSuccess": "Update Successful",
"updatedAt": "Updated At"
},
"inventory": "Inventory",
"inventory": "Subscription Limit",
"name": "Name",
"quota": "Purchase Limit/Time",
"replacement": "Reset Price/Time",
"sell": "Sell",
"show": "Home display",
"sold": "Subscription Count",
"subscribe": "Subscribe",
"subscribeGroup": "Subscription Group",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Precio con descuento",
"duration": "Duración (meses)",
"groupId": "Grupo de Suscripción",
"inventory": "Inventario",
"inventory": "Límite de suscripción",
"monthlyReset": "Reinicio Mensual",
"name": "Nombre",
"noLimit": "Sin límite",
@ -86,12 +86,13 @@
"updateSuccess": "Actualización exitosa",
"updatedAt": "Fecha de actualización"
},
"inventory": "inventario",
"inventory": "Límite de suscripción",
"name": "Nombre",
"quota": "Límite de compra/vez",
"replacement": "Restablecer precio/vez",
"sell": "Venta",
"show": "Mostrar en la página de inicio",
"sold": "Conteo de Suscripciones",
"subscribe": "Suscribirse",
"subscribeGroup": "Suscribirse al grupo",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Precio con descuento",
"duration": "Duración (meses)",
"groupId": "Grupo de Suscripción",
"inventory": "Inventario",
"inventory": "Límite de Suscripción",
"monthlyReset": "Reinicio Mensual",
"name": "Nombre",
"noLimit": "Sin límite",
@ -86,12 +86,13 @@
"updateSuccess": "Actualización exitosa",
"updatedAt": "Fecha de actualización"
},
"inventory": "inventario",
"inventory": "Límite de Suscripción",
"name": "Nombre",
"quota": "Límite de compra/vez",
"replacement": "Restablecer precio/vez",
"sell": "venta",
"show": "Mostrar en la página de inicio",
"sold": "Conteo de Suscripciones",
"subscribe": "Suscribirse",
"subscribeGroup": "Suscribirse al grupo",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "قیمت تخفیف",
"duration": "مدت زمان (ماه‌ها)",
"groupId": "گروه اشتراک",
"inventory": وجودی",
"inventory": حدودیت اشتراک",
"monthlyReset": "بازنشانی ماهانه",
"name": "نام",
"noLimit": "بدون محدودیت",
@ -86,12 +86,13 @@
"updateSuccess": "به‌روزرسانی با موفقیت انجام شد",
"updatedAt": "به‌روزرسانی در"
},
"inventory": وجودی",
"inventory": حدودیت اشتراک",
"name": "نام",
"quota": "محدودیت خرید/زمان",
"replacement": "تنظیم مجدد قیمت/زمان",
"sell": "فروش",
"show": "نمایش خانه",
"sold": "تعداد اشتراک",
"subscribe": "اشتراک",
"subscribeGroup": "گروه اشتراک",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Alennettu hinta",
"duration": "Kesto (kuukautta)",
"groupId": "Tilausryhmä",
"inventory": "Varasto",
"inventory": "Tilausraja",
"monthlyReset": "Kuukausittainen Nollaus",
"name": "Nimi",
"noLimit": "Ei rajoitusta",
@ -86,12 +86,13 @@
"updateSuccess": "Päivitys onnistui",
"updatedAt": "Päivitetty"
},
"inventory": "varasto",
"inventory": "Tilausraja",
"name": "Nimi",
"quota": "Ostorajoitus/kerta",
"replacement": "Nollaa hinta/kerta",
"sell": "myydä",
"show": "Etusivun näyttö",
"sold": "Tilausmäärä",
"subscribe": "Tilaa",
"subscribeGroup": "Tilaa ryhmä",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Prix remisé",
"duration": "Durée (mois)",
"groupId": "Groupe d'abonnement",
"inventory": "Stock",
"inventory": "Limite d'abonnement",
"monthlyReset": "Réinitialisation Mensuelle",
"name": "Nom",
"noLimit": "Illimité",
@ -86,12 +86,13 @@
"updateSuccess": "Mise à jour réussie",
"updatedAt": "Date de mise à jour"
},
"inventory": "inventaire",
"inventory": "Limite d'abonnement",
"name": "Nom",
"quota": "Limite d'achat/par fois",
"replacement": "Réinitialiser le prix/par fois",
"sell": "Vente",
"show": "Afficher sur la page d'accueil",
"sold": "Nombre d'abonnements",
"subscribe": "S'abonner",
"subscribeGroup": "S'abonner au groupe",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "छूट मूल्य",
"duration": "अवधि (महीने)",
"groupId": "सदस्यता समूह",
"inventory": "भंडार",
"inventory": "सदस्यता सीमा",
"monthlyReset": "मासिक रीसेट",
"name": "नाम",
"noLimit": "कोई सीमा नहीं",
@ -86,12 +86,13 @@
"updateSuccess": "सफलतापूर्वक अपडेट किया गया",
"updatedAt": "अपडेट का समय"
},
"inventory": "इन्वेंटरी",
"inventory": "सदस्यता सीमा",
"name": "नाम",
"quota": "प्रति खरीद सीमा",
"replacement": "मूल्य/प्रति बार रीसेट करें",
"sell": "बिक्री",
"show": "मुखपृष्ठ पर दिखाएं",
"sold": "सदस्यता गणना",
"subscribe": "सदस्यता लें",
"subscribeGroup": "सदस्यता समूह",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Kedvezményes ár",
"duration": "Időtartam (hónap)",
"groupId": "Előfizetési csoport",
"inventory": "Készlet",
"inventory": "Előfizetési korlát",
"monthlyReset": "Havi Visszaállítás",
"name": "Név",
"noLimit": "Korlátlan",
@ -86,12 +86,13 @@
"updateSuccess": "Sikeres frissítés",
"updatedAt": "Frissítés ideje"
},
"inventory": "készlet",
"inventory": "Előfizetési korlát",
"name": "Név",
"quota": "Vásárlási korlát/alkalom",
"replacement": "Ár visszaállítása/alkalom",
"sell": "eladás",
"show": "Kezdőlap megjelenítése",
"sold": "Előfizetések száma",
"subscribe": "Feliratkozás",
"subscribeGroup": "Feliratkozási csoport",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "割引価格",
"duration": "期間(月)",
"groupId": "サブスクリプショングループ",
"inventory": "在庫",
"inventory": "サブスクリプション制限",
"monthlyReset": "毎月リセット",
"name": "名称",
"noLimit": "無制限",
@ -86,12 +86,13 @@
"updateSuccess": "更新成功",
"updatedAt": "更新日時"
},
"inventory": "在庫",
"inventory": "サブスクリプションの制限",
"name": "名前",
"quota": "購入制限/回",
"replacement": "リセット価格/回",
"sell": "販売",
"show": "ホームページ表示",
"sold": "サブスクリプション数",
"subscribe": "購読",
"subscribeGroup": "グループを購読する",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "할인가",
"duration": "기간 (개월)",
"groupId": "구독 그룹",
"inventory": "재고",
"inventory": "구독 한도",
"monthlyReset": "월별 초기화",
"name": "이름",
"noLimit": "무제한",
@ -86,12 +86,13 @@
"updateSuccess": "업데이트 성공",
"updatedAt": "업데이트 시간"
},
"inventory": "재고",
"inventory": "구독 한도",
"name": "이름",
"quota": "구매 제한/회",
"replacement": "가격 재설정/회",
"sell": "판매",
"show": "홈 화면 표시",
"sold": "구독 수",
"subscribe": "구독",
"subscribeGroup": "구독 그룹",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Rabattert pris",
"duration": "Varighet (måneder)",
"groupId": "Abonnementsgruppe",
"inventory": "Lager",
"inventory": "Abonnementsgrense",
"monthlyReset": "Månedlig Tilbakestilling",
"name": "Navn",
"noLimit": "Ubegrenset",
@ -86,12 +86,13 @@
"updateSuccess": "Oppdatering vellykket",
"updatedAt": "Oppdatert"
},
"inventory": "lager",
"inventory": "Abonnementsgrense",
"name": "Navn",
"quota": "Kjøpsgrense/gang",
"replacement": "Tilbakestill pris/gang",
"sell": "Salg",
"show": "Vis på forsiden",
"sold": "Abonnementsantall",
"subscribe": "Abonner",
"subscribeGroup": "Abonner på gruppe",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Cena po zniżce",
"duration": "Czas trwania (miesiące)",
"groupId": "Grupa subskrypcyjna",
"inventory": "Zapas",
"inventory": "Limit subskrypcji",
"monthlyReset": "Miesięczny Reset",
"name": "Nazwa",
"noLimit": "Bez ograniczeń",
@ -86,12 +86,13 @@
"updateSuccess": "Zaktualizowano pomyślnie",
"updatedAt": "Czas aktualizacji"
},
"inventory": "inwentarz",
"inventory": "Limit subskrypcji",
"name": "Nazwa",
"quota": "Limit zakupu/raz",
"replacement": "Zresetuj cenę/raz",
"sell": "Sprzedaż",
"show": "Pokaż na stronie głównej",
"sold": "Liczba subskrypcji",
"subscribe": "Subskrybuj",
"subscribeGroup": "Subskrybuj grupę",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Preço com desconto",
"duration": "Duração (meses)",
"groupId": "Grupo de Assinatura",
"inventory": "Estoque",
"inventory": "Limite de Assinatura",
"monthlyReset": "Reinicialização Mensal",
"name": "Nome",
"noLimit": "Sem limite",
@ -86,12 +86,13 @@
"updateSuccess": "Atualizado com sucesso",
"updatedAt": "Atualizado em"
},
"inventory": "estoque",
"inventory": "Limite de Assinatura",
"name": "nome",
"quota": "Limite de compra/vez",
"replacement": "Redefinir preço/vez",
"sell": "venda",
"show": "Exibição na página inicial",
"sold": "Contagem de Assinaturas",
"subscribe": "Inscrever-se",
"subscribeGroup": "Inscrever-se no grupo",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Preț redus",
"duration": "Durată (luni)",
"groupId": "Grup de Abonament",
"inventory": "Stoc",
"inventory": "Limit de Abonament",
"monthlyReset": "Resetare Lunară",
"name": "Nume",
"noLimit": "Fără limită",
@ -86,12 +86,13 @@
"updateSuccess": "Actualizat cu succes",
"updatedAt": "Data actualizării"
},
"inventory": "inventar",
"inventory": "Limită de abonament",
"name": "Nume",
"quota": "Limită de achiziție/pe tranzacție",
"replacement": "Resetare preț/pe utilizare",
"sell": "Vânzare",
"show": "Afișare pe pagina principală",
"sold": "Număr de abonamente",
"subscribe": "Abonare",
"subscribeGroup": "Abonare grup",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Цена со скидкой",
"duration": "Продолжительность (месяцы)",
"groupId": "Группа подписки",
"inventory": "Инвентарь",
"inventory": "Лимит подписки",
"monthlyReset": "Ежемесячный Сброс",
"name": "Название",
"noLimit": "Без ограничений",
@ -86,12 +86,13 @@
"updateSuccess": "Успешно обновлено",
"updatedAt": "Время обновления"
},
"inventory": "инвентарь",
"inventory": "Лимит подписки",
"name": "название",
"quota": "Лимит/раз",
"replacement": "Сбросить цену/раз",
"sell": "Продажа",
"show": "Показать на главной странице",
"sold": "Количество подписок",
"subscribe": "Подписаться",
"subscribeGroup": "Подписаться на группу",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "ราคาหลังหักส่วนลด",
"duration": "ระยะเวลา (เดือน)",
"groupId": "กลุ่มการสมัครสมาชิก",
"inventory": "สต็อก",
"inventory": "ขีดจำกัดการสมัครสมาชิก",
"monthlyReset": "รีเซ็ตทุกเดือน",
"name": "ชื่อ",
"noLimit": "ไม่จำกัด",
@ -86,12 +86,13 @@
"updateSuccess": "อัปเดตสำเร็จ",
"updatedAt": "เวลาอัปเดต"
},
"inventory": "สินค้าคงคลัง",
"inventory": "ขีดจำกัดการสมัครสมาชิก",
"name": "ชื่อ",
"quota": "จำกัดการซื้อ/ครั้ง",
"replacement": "รีเซ็ตราคา/ครั้ง",
"sell": "ขาย",
"show": "แสดงหน้าแรก",
"sold": "จำนวนการสมัครสมาชิก",
"subscribe": "สมัครสมาชิก",
"subscribeGroup": "สมัครกลุ่ม",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "İndirimli Fiyat",
"duration": "Süre (ay)",
"groupId": "Abonelik Grubu",
"inventory": "Stok",
"inventory": "Abonelik Limiti",
"monthlyReset": "Aylık Sıfırlama",
"name": "Ad",
"noLimit": "Sınırsız",
@ -86,12 +86,13 @@
"updateSuccess": "Başarıyla güncellendi",
"updatedAt": "Güncellenme Zamanı"
},
"inventory": "envanter",
"inventory": "Abonelik Limiti",
"name": "isim",
"quota": "Kota/satın alma",
"replacement": "Fiyatı sıfırla/kez",
"sell": "satış",
"show": "Ana sayfada göster",
"sold": "Abonelik Sayısı",
"subscribe": "Abone Ol",
"subscribeGroup": "Gruba Abone Ol",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Ціна зі знижкою",
"duration": "Тривалість (місяці)",
"groupId": "Група підписки",
"inventory": "Запаси",
"inventory": "Ліміт підписки",
"monthlyReset": "Щомісячне Скидання",
"name": "Назва",
"noLimit": "Без обмежень",
@ -86,12 +86,13 @@
"updateSuccess": "Успішно оновлено",
"updatedAt": "Час оновлення"
},
"inventory": "інвентар",
"inventory": "Ліміт підписки",
"name": "Назва",
"quota": "Обмеження на покупку/раз",
"replacement": "Скидання ціни/раз",
"sell": "продаж",
"show": "Показати на головній сторінці",
"sold": "Кількість підписок",
"subscribe": "Підписатися",
"subscribeGroup": "Підписатися на групу",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "Giá sau giảm",
"duration": "Thời gian (tháng)",
"groupId": "Nhóm Đăng Ký",
"inventory": "Tồn kho",
"inventory": "Giới Hạn Đăng Ký",
"monthlyReset": "Đặt Lại Hàng Tháng",
"name": "Tên",
"noLimit": "Không giới hạn",
@ -86,12 +86,13 @@
"updateSuccess": "Cập nhật thành công",
"updatedAt": "Thời gian cập nhật"
},
"inventory": "Hàng tồn kho",
"inventory": "Giới Hạn Đăng Ký",
"name": "Tên",
"quota": "Giới hạn mua/lần",
"replacement": "Đặt lại giá/lần",
"sell": "Bán hàng",
"show": "Hiển thị trang chủ",
"sold": "Số lượng đăng ký",
"subscribe": "Đăng ký",
"subscribeGroup": "Nhóm đăng ký",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "折扣价格",
"duration": "时长(月)",
"groupId": "订阅组",
"inventory": "库存",
"inventory": "订阅限制",
"monthlyReset": "按月重置",
"name": "名称",
"noLimit": "无限制",
@ -86,12 +86,13 @@
"updateSuccess": "更新成功",
"updatedAt": "更新时间"
},
"inventory": "库存",
"inventory": "订阅限制",
"name": "名称",
"quota": "限购/次",
"replacement": "重置价格/次",
"sell": "销售",
"show": "首页显示",
"sold": "订阅数量",
"subscribe": "订阅",
"subscribeGroup": "订阅组",
"tabs": {

View File

@ -36,7 +36,7 @@
"discount_price": "折扣價格",
"duration": "時長(月)",
"groupId": "訂閱組別",
"inventory": "庫存",
"inventory": "訂閱限制",
"monthlyReset": "每月重置",
"name": "名稱",
"noLimit": "無限制",
@ -86,12 +86,13 @@
"updateSuccess": "更新成功",
"updatedAt": "更新時間"
},
"inventory": "庫存",
"inventory": "訂閱限制",
"name": "名稱",
"quota": "限購/次",
"replacement": "重置價格/次",
"sell": "銷售",
"show": "首頁顯示",
"sold": "訂閱數量",
"subscribe": "訂閱",
"subscribeGroup": "訂閱組",
"tabs": {