| 12345678910111213141516171819202122232425262728 |
- // ---------------------------------------------------------------------------
- // Ordner: components/admin/users/edit-user
- // Datei: editUserUtils.js
- // Relativer Pfad: components/admin/users/edit-user/editUserUtils.js
- // ---------------------------------------------------------------------------
- import { ROLE_LABELS_DE } from "@/components/admin/users/usersUi";
- export const EDIT_ROLE_OPTIONS = Object.freeze([
- { value: "branch", label: ROLE_LABELS_DE.branch },
- { value: "admin", label: ROLE_LABELS_DE.admin },
- { value: "superadmin", label: ROLE_LABELS_DE.superadmin },
- { value: "dev", label: ROLE_LABELS_DE.dev },
- ]);
- export const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
- export const BRANCH_RE = /^NL\d+$/;
- export function normalizeUsername(value) {
- return String(value || "")
- .trim()
- .toLowerCase();
- }
- export function normalizeEmail(value) {
- return String(value || "")
- .trim()
- .toLowerCase();
- }
|