fix(workspaces): streamline member import modal
Some checks failed
Frontend CI/CD / build (push) Has been cancelled
Frontend CI/CD / deploy (push) Has been cancelled

This commit is contained in:
2026-06-19 01:48:12 +03:30
parent c7ede31b68
commit 2e7ea40a79
4 changed files with 461 additions and 355 deletions

View File

@@ -794,6 +794,21 @@ export default function EditWorkspace() {
invalid: t.workspace?.memberImport?.invalid || "Invalid",
noRows: t.workspace?.memberImport?.noRows || "No rows loaded yet.",
localErrors: t.workspace?.memberImport?.localErrors || "Fix local file errors before backend validation.",
helpTitle: t.workspace?.memberImport?.helpTitle || "Import help",
helpDescription: t.workspace?.memberImport?.helpDescription || "Use these rules to prepare a valid member import file.",
helpCurrencyTitle: t.workspace?.memberImport?.helpCurrencyTitle || "Currency options",
helpRolesTitle: t.workspace?.memberImport?.helpRolesTitle || "Role options",
roleAdminDescription: t.workspace?.memberImport?.roleAdminDescription || "Can manage workspace settings, members, projects, reports, and shared data.",
roleMemberDescription: t.workspace?.memberImport?.roleMemberDescription || "Can use the workspace normally and record time for accessible projects.",
roleGuestDescription: t.workspace?.memberImport?.roleGuestDescription || "Has limited workspace access and can record time only where access is granted.",
helpMobilePrefix: t.workspace?.memberImport?.helpMobilePrefix || "Column",
helpMobileSuffix: t.workspace?.memberImport?.helpMobileSuffix || "is required and must belong to an existing registered user.",
helpRolePrefix: t.workspace?.memberImport?.helpRolePrefix || "Column",
helpRoleSuffix: t.workspace?.memberImport?.helpRoleSuffix || "is optional. Empty role becomes member.",
helpRatePrefix: t.workspace?.memberImport?.helpRatePrefix || "Columns",
helpRateMiddle: t.workspace?.memberImport?.helpRateMiddle || "and",
helpRateSuffix: t.workspace?.memberImport?.helpRateSuffix || "are optional, but must be filled together when used.",
helpSamplesTitle: t.workspace?.memberImport?.helpSamplesTitle || "Sample files",
success: t.workspace?.memberImport?.success || "Members imported successfully.",
parseFailed: t.workspace?.memberImport?.parseFailed || "Failed to parse the file.",
missingMobile: t.workspace?.memberImport?.missingMobile || "Mobile is required.",
@@ -802,6 +817,20 @@ export default function EditWorkspace() {
invalidRate: t.workspace?.memberImport?.invalidRate || "Hourly rate must be a valid positive number.",
rateCurrencyPair: t.workspace?.memberImport?.rateCurrencyPair || "Hourly rate and currency must be provided together.",
tooManyRows: t.workspace?.memberImport?.tooManyRows || "Import is limited to 500 rows.",
messageMap: t.workspace?.memberImport?.messagesMap || {
too_many_rows: "Import is limited to 500 rows.",
mobile_required: "Mobile is required.",
duplicate_mobile: "This mobile appears more than once.",
user_not_found: "No registered user was found with this mobile.",
already_member: "This user is already a workspace member.",
owner_role_not_allowed: "Owner role cannot be imported.",
invalid_role: "Role must be admin, member, or guest.",
role_permission_denied: "You do not have permission to assign this role.",
rate_currency_pair_required: "Hourly rate and currency must be provided together.",
hourly_rate_positive: "Hourly rate must be greater than zero.",
hourly_rate_invalid: "Hourly rate must be a valid number.",
currency_invalid: "Currency is not valid.",
},
}}
/>
) : null}