diff --git a/apps/admin/src/sections/user/user-subscription/subscription-form.tsx b/apps/admin/src/sections/user/user-subscription/subscription-form.tsx index 3001fea..9eb1051 100644 --- a/apps/admin/src/sections/user/user-subscription/subscription-form.tsx +++ b/apps/admin/src/sections/user/user-subscription/subscription-form.tsx @@ -96,144 +96,148 @@ export function SubscriptionForm({ {title} - - - ( - - {t("subscription", "Subscription")} - - - onChange={(value) => { - form.setValue(field.name, value); - }} - options={subscribes?.map((item) => ({ - value: item.id!, - label: item.name!, - }))} - placeholder="Select Subscription" - value={field.value} - /> - - - - )} - /> - ( - - {t("trafficLimit", "Traffic Limit")} - - - unitConversion("bytesToGb", value) - } - formatOutput={(value) => - unitConversion("gbToBytes", value) - } - onValueChange={(value) => { - form.setValue(field.name, value as number); - }} - suffix="GB" - /> - - - - )} - /> - ( - - - {t("uploadTraffic", "Upload Traffic")} - - - - unitConversion("bytesToGb", value) - } - formatOutput={(value) => - unitConversion("gbToBytes", value) - } - onValueChange={(value) => { - form.setValue(field.name, value as number); - }} - suffix="GB" - /> - - - - )} - /> - ( - - - {t("downloadTraffic", "Download Traffic")} - - - - unitConversion("bytesToGb", value) - } - formatOutput={(value) => - unitConversion("gbToBytes", value) - } - onValueChange={(value) => { - form.setValue(field.name, value as number); - }} - suffix="GB" - /> - - - - )} - /> - ( - - {t("expiredAt", "Expired At")} - - { - form.setValue(field.name, value || 0); - }} - placeholder={t("permanent", "Permanent")} - value={ - field.value && field.value > 0 - ? field.value - : undefined - } - /> - - - - )} - /> - - + + + + ( + + {t("subscription", "Subscription")} + + + onChange={(value) => { + form.setValue(field.name, value); + }} + options={subscribes?.map((item) => ({ + value: item.id!, + label: item.name!, + }))} + placeholder="Select Subscription" + value={field.value} + /> + + + + )} + /> + ( + + + {t("trafficLimit", "Traffic Limit")} + + + + unitConversion("bytesToGb", value) + } + formatOutput={(value) => + unitConversion("gbToBytes", value) + } + onValueChange={(value) => { + form.setValue(field.name, value as number); + }} + suffix="GB" + /> + + + + )} + /> + ( + + + {t("uploadTraffic", "Upload Traffic")} + + + + unitConversion("bytesToGb", value) + } + formatOutput={(value) => + unitConversion("gbToBytes", value) + } + onValueChange={(value) => { + form.setValue(field.name, value as number); + }} + suffix="GB" + /> + + + + )} + /> + ( + + + {t("downloadTraffic", "Download Traffic")} + + + + unitConversion("bytesToGb", value) + } + formatOutput={(value) => + unitConversion("gbToBytes", value) + } + onValueChange={(value) => { + form.setValue(field.name, value as number); + }} + suffix="GB" + /> + + + + )} + /> + ( + + {t("expiredAt", "Expired At")} + + { + form.setValue(field.name, value || 0); + }} + placeholder={t("permanent", "Permanent")} + value={ + field.value && field.value > 0 + ? field.value + : undefined + } + /> + + + + )} + /> + + +