Added translations for the task types
This commit is contained in:
parent
6e939fae6e
commit
40e81a555f
@ -6,6 +6,7 @@
|
|||||||
"Active": "Active",
|
"Active": "Active",
|
||||||
"Add": "Add",
|
"Add": "Add",
|
||||||
"AddDomain": "Add Domain",
|
"AddDomain": "Add Domain",
|
||||||
|
"AddTask": "Add Task",
|
||||||
"Address": "Address",
|
"Address": "Address",
|
||||||
"AddUser": "Add User",
|
"AddUser": "Add User",
|
||||||
"AddWorkflowTemplate": "Add Workflow Template",
|
"AddWorkflowTemplate": "Add Workflow Template",
|
||||||
|
|||||||
14
public/locales/en/taskTypes.json
Normal file
14
public/locales/en/taskTypes.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"AdhocApprovalTask": "Adhoc Approval",
|
||||||
|
"ApprovalTask": "Approval",
|
||||||
|
"AssetUploadTask": "Asset Upload",
|
||||||
|
"BasicTask": "Basic",
|
||||||
|
"ContentCollationTask": "Content Collation",
|
||||||
|
"FileReleaseTask": "File Release",
|
||||||
|
"FormDataInputTask": "Form Data Input",
|
||||||
|
"LinkActivityTask": "Link Activity",
|
||||||
|
"MilestoneTask": "Milestone",
|
||||||
|
"StageTask": "Stage",
|
||||||
|
"VisualBriefReviewTask": "Visual Brief Review",
|
||||||
|
"VisualBriefUploadTask": "Visual Brief Upload"
|
||||||
|
}
|
||||||
@ -48,7 +48,7 @@ import WorkflowTemplateManager from "./modules/manager/workflowTemplates/Workflo
|
|||||||
import WorkflowTemplateDetails from "./modules/manager/workflowTemplates/WorkflowTemplateDetails";
|
import WorkflowTemplateDetails from "./modules/manager/workflowTemplates/WorkflowTemplateDetails";
|
||||||
|
|
||||||
function GetSecureRoutes() {
|
function GetSecureRoutes() {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -21,7 +21,7 @@ function ConfirmButton<T>({
|
|||||||
onClick,
|
onClick,
|
||||||
}: ConfirmButtonProps<T>) {
|
}: ConfirmButtonProps<T>) {
|
||||||
const [firstClick, setFirstClick] = useState(false);
|
const [firstClick, setFirstClick] = useState(false);
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const handleFirstClick = useCallback(() => {
|
const handleFirstClick = useCallback(() => {
|
||||||
setFirstClick(true);
|
setFirstClick(true);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ const CustomFieldsEditor: React.FC<CustomFieldsEditorProps> = ({
|
|||||||
onAdd,
|
onAdd,
|
||||||
onDelete,
|
onDelete,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [id, setId] = useState<GeneralIdRef | undefined>(undefined);
|
const [id, setId] = useState<GeneralIdRef | undefined>(undefined);
|
||||||
const [displayName, setDisplayName] = useState<string | undefined>(undefined);
|
const [displayName, setDisplayName] = useState<string | undefined>(undefined);
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { Namespaces } from "../../i18n/i18n";
|
|||||||
interface LoadingProps {}
|
interface LoadingProps {}
|
||||||
|
|
||||||
const LoadingPanel: React.FC<LoadingProps> = () => {
|
const LoadingPanel: React.FC<LoadingProps> = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
return <div>{t("Loading")}</div>;
|
return <div>{t("Loading")}</div>;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -51,7 +51,7 @@ export default function Select({
|
|||||||
onChange,
|
onChange,
|
||||||
...rest
|
...rest
|
||||||
}: SelectProps) {
|
}: SelectProps) {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const isMultiple = multiple ?? options === undefined;
|
const isMultiple = multiple ?? options === undefined;
|
||||||
const actualValue = NormalizeSelectValue(value, isMultiple);
|
const actualValue = NormalizeSelectValue(value, isMultiple);
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ export default function TableBody<T>({
|
|||||||
onSelectRow,
|
onSelectRow,
|
||||||
showSecondaryAudit,
|
showSecondaryAudit,
|
||||||
}: TableBodyProps<T>): JSX.Element {
|
}: TableBodyProps<T>): JSX.Element {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const resolvePath = (path: string, args: string[]) => {
|
const resolvePath = (path: string, args: string[]) => {
|
||||||
let modifiedPath = path;
|
let modifiedPath = path;
|
||||||
let index = 0;
|
let index = 0;
|
||||||
|
|||||||
@ -9,6 +9,7 @@ export const Namespaces = {
|
|||||||
Common: "common",
|
Common: "common",
|
||||||
MailTypes: "mailTypes",
|
MailTypes: "mailTypes",
|
||||||
HtmlIsland: "htmlIsland",
|
HtmlIsland: "htmlIsland",
|
||||||
|
TaskTypes: "taskTypes",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type Namespace = (typeof Namespaces)[keyof typeof Namespaces];
|
export type Namespace = (typeof Namespaces)[keyof typeof Namespaces];
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { Namespaces } from "../../i18n/i18n";
|
|||||||
export default function Audit() {
|
export default function Audit() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<AuditLogEntry>>({
|
const [pagedData, setPagedData] = useState<Paginated<AuditLogEntry>>({
|
||||||
|
|||||||
@ -27,7 +27,7 @@ interface AuditFieldChangeValues {
|
|||||||
|
|
||||||
export default function AuditTable(props: PublishedTableProps<AuditLogEntry>) {
|
export default function AuditTable(props: PublishedTableProps<AuditLogEntry>) {
|
||||||
const { data, sortColumn, onChangePage, onSearch, onSort } = props;
|
const { data, sortColumn, onChangePage, onSearch, onSort } = props;
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const fieldColumns: Column<AuditFieldChangeValues>[] = useMemo(
|
const fieldColumns: Column<AuditFieldChangeValues>[] = useMemo(
|
||||||
() => [
|
() => [
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Namespaces } from "../../i18n/i18n";
|
import { Namespaces } from "../../i18n/i18n";
|
||||||
|
|
||||||
export default function BlockedIPs() {
|
export default function BlockedIPs() {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<BlockedIPEntry>>({
|
const [pagedData, setPagedData] = useState<Paginated<BlockedIPEntry>>({
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { Namespaces } from "../../../i18n/i18n";
|
|||||||
export default function BlockedIPsTable(
|
export default function BlockedIPsTable(
|
||||||
props: PublishedTableProps<BlockedIPEntry>,
|
props: PublishedTableProps<BlockedIPEntry>,
|
||||||
) {
|
) {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const { data, sortColumn, onChangePage, onSearch, onSort, onDelete } = props;
|
const { data, sortColumn, onChangePage, onSearch, onSort, onDelete } = props;
|
||||||
|
|
||||||
const canUnblockBlockedIPAddress =
|
const canUnblockBlockedIPAddress =
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import ExpandableCell from "../../../components/common/ExpandableCell";
|
|||||||
export default function ErrorLogsTable(
|
export default function ErrorLogsTable(
|
||||||
props: PublishedTableProps<ErrorLog>,
|
props: PublishedTableProps<ErrorLog>,
|
||||||
): JSX.Element {
|
): JSX.Element {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const { data, sortColumn, onChangePage, onSearch, onSort } = props;
|
const { data, sortColumn, onChangePage, onSearch, onSort } = props;
|
||||||
|
|
||||||
const columns: Column<ErrorLog>[] = useMemo(
|
const columns: Column<ErrorLog>[] = useMemo(
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Namespaces } from "../../i18n/i18n";
|
import { Namespaces } from "../../i18n/i18n";
|
||||||
|
|
||||||
const ErrorLogs = (): JSX.Element => {
|
const ErrorLogs = (): JSX.Element => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<ErrorLog>>({
|
const [pagedData, setPagedData] = useState<Paginated<ErrorLog>>({
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|||||||
@ -19,7 +19,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const EmailUserActionConfirmEmail: React.FC<Props> = ({ emailUserAction }) => {
|
const EmailUserActionConfirmEmail: React.FC<Props> = ({ emailUserAction }) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [confirmPassword, setConfirmPassword] = useState("");
|
const [confirmPassword, setConfirmPassword] = useState("");
|
||||||
const [emailConfirmed, setEmailConfirmed] = useState(false);
|
const [emailConfirmed, setEmailConfirmed] = useState(false);
|
||||||
|
|||||||
@ -16,7 +16,7 @@ interface Props {
|
|||||||
const EmailUserActionDiableTwoFactorAuthentication: React.FC<Props> = ({
|
const EmailUserActionDiableTwoFactorAuthentication: React.FC<Props> = ({
|
||||||
emailUserAction,
|
emailUserAction,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [authenticatorDisabled, setAuthenticatorDisabled] = useState(false);
|
const [authenticatorDisabled, setAuthenticatorDisabled] = useState(false);
|
||||||
|
|
||||||
const LABEL_DISABLE_AUTHENTICATOR = t("DisableAuthenticator");
|
const LABEL_DISABLE_AUTHENTICATOR = t("DisableAuthenticator");
|
||||||
|
|||||||
@ -19,7 +19,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const EmailUserActionPasswordReset: React.FC<Props> = ({ emailUserAction }) => {
|
const EmailUserActionPasswordReset: React.FC<Props> = ({ emailUserAction }) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [confirmPassword, setConfirmPassword] = useState("");
|
const [confirmPassword, setConfirmPassword] = useState("");
|
||||||
const [passwordChanged, setPasswordChanged] = useState(false);
|
const [passwordChanged, setPasswordChanged] = useState(false);
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export interface ForgotPasswordData extends FormData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ForgotPassword: React.FC = () => {
|
const ForgotPassword: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [username, setUsername] = useState("");
|
const [username, setUsername] = useState("");
|
||||||
const [emailSent, setEmailSent] = useState(false);
|
const [emailSent, setEmailSent] = useState(false);
|
||||||
const [generalError, setGeneralError] = useState("");
|
const [generalError, setGeneralError] = useState("");
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Namespaces } from "../../../i18n/i18n";
|
import { Namespaces } from "../../../i18n/i18n";
|
||||||
|
|
||||||
const InternalLoginForm: React.FC = () => {
|
const InternalLoginForm: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [isInNextStage, setIsInNextStage] = useState(false);
|
const [isInNextStage, setIsInNextStage] = useState(false);
|
||||||
const [emailSent, setEmailSent] = useState(false);
|
const [emailSent, setEmailSent] = useState(false);
|
||||||
const passwordMaxLength = 255;
|
const passwordMaxLength = 255;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Namespaces } from "../../../i18n/i18n";
|
import { Namespaces } from "../../../i18n/i18n";
|
||||||
|
|
||||||
const LeftMenu: React.FC = () => {
|
const LeftMenu: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const [openMenuItem, setOpenMenuItem] = useState<
|
const [openMenuItem, setOpenMenuItem] = useState<
|
||||||
{ id: string; children: React.ReactNode } | undefined
|
{ id: string; children: React.ReactNode } | undefined
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { Namespaces } from "../../../i18n/i18n";
|
|||||||
import authentication from "../services/authenticationService";
|
import authentication from "../services/authenticationService";
|
||||||
|
|
||||||
const Logout: React.FC = () => {
|
const Logout: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
authentication.logout();
|
authentication.logout();
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Namespaces } from "../../../i18n/i18n";
|
import { Namespaces } from "../../../i18n/i18n";
|
||||||
|
|
||||||
const NotFound: React.FC = () => {
|
const NotFound: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
return <h1>{t("NotFound")}</h1>;
|
return <h1>{t("NotFound")}</h1>;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export interface TopMenuProps {
|
|||||||
|
|
||||||
function TopMenu(props: TopMenuProps) {
|
function TopMenu(props: TopMenuProps) {
|
||||||
const user = getCurrentUser();
|
const user = getCurrentUser();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Navbar className="navbar bg-body-tertiary px-4 Header">
|
<Navbar className="navbar bg-body-tertiary px-4 Header">
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Namespaces } from "../../i18n/i18n";
|
import { Namespaces } from "../../i18n/i18n";
|
||||||
|
|
||||||
const HomePage: React.FC = () => {
|
const HomePage: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const redirect = () => {
|
const redirect = () => {
|
||||||
window.location.href = "/organisations";
|
window.location.href = "/organisations";
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { CustomField } from "../services/customFieldsService";
|
|||||||
const CustomFieldsTable: React.FC<PublishedTableProps<CustomField>> = (
|
const CustomFieldsTable: React.FC<PublishedTableProps<CustomField>> = (
|
||||||
props,
|
props,
|
||||||
) => {
|
) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<CustomField>[] = [
|
const columns: Column<CustomField>[] = [
|
||||||
{ key: "name", label: t("Name"), order: "asc" },
|
{ key: "name", label: t("Name"), order: "asc" },
|
||||||
|
|||||||
@ -37,7 +37,7 @@ const CustomFieldDetails: React.FC<CustomFieldDetailsProps> = ({
|
|||||||
editMode = false,
|
editMode = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { customFieldId } = useParams<{ customFieldId: string }>();
|
const { customFieldId } = useParams<{ customFieldId: string }>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelFieldType = t("FieldType");
|
const labelFieldType = t("FieldType");
|
||||||
|
|||||||
@ -20,7 +20,7 @@ const initialPagedData: Paginated<CustomField> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const CustomFields: React.FC = () => {
|
const CustomFields: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] =
|
const [pagedData, setPagedData] =
|
||||||
useState<Paginated<CustomField>>(initialPagedData);
|
useState<Paginated<CustomField>>(initialPagedData);
|
||||||
|
|||||||
@ -18,7 +18,7 @@ const initialPagedData: Paginated<GetDomain> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Domains: React.FC = () => {
|
const Domains: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] =
|
const [pagedData, setPagedData] =
|
||||||
useState<Paginated<GetDomain>>(initialPagedData);
|
useState<Paginated<GetDomain>>(initialPagedData);
|
||||||
|
|||||||
@ -14,7 +14,7 @@ interface DomainsDetailsProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const DomainsDetails: React.FC<DomainsDetailsProps> = ({ isEditMode }) => {
|
const DomainsDetails: React.FC<DomainsDetailsProps> = ({ isEditMode }) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
|
|
||||||
const canViewMailTemplates = authentication.hasAccess("ViewDomain");
|
const canViewMailTemplates = authentication.hasAccess("ViewDomain");
|
||||||
|
|||||||
@ -23,7 +23,7 @@ const AddUserToRole: React.FC<LocAddUserToRoleProps> = ({ isEditMode }) => {
|
|||||||
domainId: string;
|
domainId: string;
|
||||||
roleId: string;
|
roleId: string;
|
||||||
}>();
|
}>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelUserId = t("User");
|
const labelUserId = t("User");
|
||||||
const labelApply = t("Save");
|
const labelApply = t("Save");
|
||||||
|
|||||||
@ -24,7 +24,7 @@ const EmailTemplateEditor: React.FC<EmailTemplateEditorProps> = ({
|
|||||||
domainId,
|
domainId,
|
||||||
currentMailType,
|
currentMailType,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const paramsData = useParams<{ domainId: string }>();
|
const paramsData = useParams<{ domainId: string }>();
|
||||||
const finalDomainId = domainId || paramsData.domainId;
|
const finalDomainId = domainId || paramsData.domainId;
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ interface GeneralTabProps {
|
|||||||
|
|
||||||
const GeneralTab: React.FC<GeneralTabProps> = ({ isEditMode }) => {
|
const GeneralTab: React.FC<GeneralTabProps> = ({ isEditMode }) => {
|
||||||
const { domainId } = useParams<{ domainId: string }>();
|
const { domainId } = useParams<{ domainId: string }>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelSsoProvider = t("SsoProvider");
|
const labelSsoProvider = t("SsoProvider");
|
||||||
|
|||||||
@ -32,7 +32,7 @@ interface RoleAccessEditorProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const RoleAccessEditor: React.FC<RoleAccessEditorProps> = ({ role }) => {
|
const RoleAccessEditor: React.FC<RoleAccessEditorProps> = ({ role }) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [accessList, setAccessList] =
|
const [accessList, setAccessList] =
|
||||||
useState<Paginated<GetSecurityAccess>>(initialAccessList);
|
useState<Paginated<GetSecurityAccess>>(initialAccessList);
|
||||||
|
|||||||
@ -24,7 +24,7 @@ const RolesDetails: React.FC<RolesDetailsProps> = ({ isEditMode }) => {
|
|||||||
domainId: string;
|
domainId: string;
|
||||||
roleId: string;
|
roleId: string;
|
||||||
}>();
|
}>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelApply = t("Save");
|
const labelApply = t("Save");
|
||||||
|
|||||||
@ -35,7 +35,7 @@ const RolesEditor: React.FC<RolesEditorProps> = ({
|
|||||||
initialRoleId,
|
initialRoleId,
|
||||||
hashSegment,
|
hashSegment,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const hashRoleId = useHashSegment(
|
const hashRoleId = useHashSegment(
|
||||||
hashSegment !== undefined ? hashSegment : -1,
|
hashSegment !== undefined ? hashSegment : -1,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import authentication from "../../../frame/services/authenticationService";
|
|||||||
import { GetRoleResponse } from "../serrvices/rolesService";
|
import { GetRoleResponse } from "../serrvices/rolesService";
|
||||||
|
|
||||||
const RolesTable: React.FC<PublishedTableProps<GetRoleResponse>> = (props) => {
|
const RolesTable: React.FC<PublishedTableProps<GetRoleResponse>> = (props) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<GetRoleResponse>[] = [
|
const columns: Column<GetRoleResponse>[] = [
|
||||||
{ key: "name", label: t("Name"), order: "asc" },
|
{ key: "name", label: t("Name"), order: "asc" },
|
||||||
|
|||||||
@ -22,7 +22,7 @@ const RollAccessTable: React.FC<RollAccessTableProps> = ({
|
|||||||
onSort,
|
onSort,
|
||||||
data,
|
data,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [deltaAdditions, setDeltaAdditions] = useState<string[]>([]);
|
const [deltaAdditions, setDeltaAdditions] = useState<string[]>([]);
|
||||||
const [deltaDeletions, setDeltaDeletions] = useState<string[]>([]);
|
const [deltaDeletions, setDeltaDeletions] = useState<string[]>([]);
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ const SecurityRolesTab: React.FC<SecurityRolesTabProps> = ({
|
|||||||
initialRoleId,
|
initialRoleId,
|
||||||
initialInnerTab,
|
initialInnerTab,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [selectedRole, setSelectedRole] = useState<GetRoleResponse | undefined>(
|
const [selectedRole, setSelectedRole] = useState<GetRoleResponse | undefined>(
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ interface UserRoleEditorProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const UserRoleEditor: React.FC<UserRoleEditorProps> = ({ role }) => {
|
const UserRoleEditor: React.FC<UserRoleEditorProps> = ({ role }) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] =
|
const [pagedData, setPagedData] =
|
||||||
useState<Paginated<RoleUser>>(initialPagedData);
|
useState<Paginated<RoleUser>>(initialPagedData);
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import authentication from "../../../frame/services/authenticationService";
|
|||||||
import { RoleUser } from "../serrvices/rolesService";
|
import { RoleUser } from "../serrvices/rolesService";
|
||||||
|
|
||||||
const UserRolesTable: React.FC<PublishedTableProps<RoleUser>> = (props) => {
|
const UserRolesTable: React.FC<PublishedTableProps<RoleUser>> = (props) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<RoleUser>[] = [
|
const columns: Column<RoleUser>[] = [
|
||||||
{ key: "displayName", label: t("Name"), order: "asc" },
|
{ key: "displayName", label: t("Name"), order: "asc" },
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import authentication from "../../../frame/services/authenticationService";
|
|||||||
import { GetDomain } from "../serrvices/domainsService";
|
import { GetDomain } from "../serrvices/domainsService";
|
||||||
|
|
||||||
const DomainsTable: React.FC<PublishedTableProps<GetDomain>> = (props) => {
|
const DomainsTable: React.FC<PublishedTableProps<GetDomain>> = (props) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<GetDomain>[] = [
|
const columns: Column<GetDomain>[] = [
|
||||||
{ key: "name", label: t("Name"), order: "asc" },
|
{ key: "name", label: t("Name"), order: "asc" },
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import formsService, { GetFormResponse } from "./services/formsService";
|
|||||||
import Loading from "../../../components/common/Loading";
|
import Loading from "../../../components/common/Loading";
|
||||||
|
|
||||||
const Forms: React.FC = () => {
|
const Forms: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<GetFormResponse>>({
|
const [pagedData, setPagedData] = useState<Paginated<GetFormResponse>>({
|
||||||
|
|||||||
@ -20,7 +20,7 @@ const FormsDetails: React.FC<{ editMode?: boolean }> = ({
|
|||||||
editMode = false,
|
editMode = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { formId } = useParams<{ formId: string }>();
|
const { formId } = useParams<{ formId: string }>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelDefinition = t("Definition");
|
const labelDefinition = t("Definition");
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const FormsTable: React.FC<PublishedTableProps<GetFormResponse>> = ({
|
|||||||
onDelete,
|
onDelete,
|
||||||
onSort,
|
onSort,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<GetFormResponse>[] = useMemo(
|
const columns: Column<GetFormResponse>[] = useMemo(
|
||||||
() => [
|
() => [
|
||||||
|
|||||||
@ -30,7 +30,7 @@ const GlossariesDetails: React.FC<GlossariesDetailsProps> = ({
|
|||||||
editMode = false,
|
editMode = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { glossaryId } = useParams<{ glossaryId: string }>();
|
const { glossaryId } = useParams<{ glossaryId: string }>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelChildCustomFieldDefinition = t("CustomFieldForChildEntries");
|
const labelChildCustomFieldDefinition = t("CustomFieldForChildEntries");
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import Loading from "../../../components/common/Loading";
|
|||||||
import Permission from "../../../components/common/Permission";
|
import Permission from "../../../components/common/Permission";
|
||||||
|
|
||||||
const Glossaries: React.FC = () => {
|
const Glossaries: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const { glossaryId } = useParams<{ glossaryId: string }>();
|
const { glossaryId } = useParams<{ glossaryId: string }>();
|
||||||
|
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ const GlossariesTable: React.FC<GlossariesTableProps> = ({
|
|||||||
data,
|
data,
|
||||||
onDelete,
|
onDelete,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const [columnsList, setColumnsList] = useState<CustomColumn[]>([]);
|
const [columnsList, setColumnsList] = useState<CustomColumn[]>([]);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";import { Namespaces } from "../../../i18n/i18n";import Button, { ButtonType } from "../../../components/common/Button";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Namespaces } from "../../../i18n/i18n";
|
||||||
|
import Button, { ButtonType } from "../../../components/common/Button";
|
||||||
import Column from "../../../components/common/columns";
|
import Column from "../../../components/common/columns";
|
||||||
import Permission from "../../../components/common/Permission";
|
import Permission from "../../../components/common/Permission";
|
||||||
import { Paginated } from "../../../services/Paginated";
|
import { Paginated } from "../../../services/Paginated";
|
||||||
@ -10,7 +12,7 @@ import organisationsService, {
|
|||||||
import Loading from "../../../components/common/Loading";
|
import Loading from "../../../components/common/Loading";
|
||||||
|
|
||||||
const Organisations: React.FC = () => {
|
const Organisations: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<ReadOrganisation>>({
|
const [pagedData, setPagedData] = useState<Paginated<ReadOrganisation>>({
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|||||||
@ -21,7 +21,7 @@ const OrganisationsDetails: React.FC<{ editMode?: boolean }> = ({
|
|||||||
editMode = false,
|
editMode = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { organisationId } = useParams<{ organisationId: string }>();
|
const { organisationId } = useParams<{ organisationId: string }>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelAddress = t("Address");
|
const labelAddress = t("Address");
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const OrganisationsTable: React.FC<PublishedTableProps<ReadOrganisation>> = ({
|
|||||||
onDelete,
|
onDelete,
|
||||||
onSort,
|
onSort,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const canViewSite = authentication.hasAccess("ViewSite");
|
const canViewSite = authentication.hasAccess("ViewSite");
|
||||||
|
|
||||||
const columns: Column<ReadOrganisation>[] = useMemo(
|
const columns: Column<ReadOrganisation>[] = useMemo(
|
||||||
|
|||||||
@ -26,7 +26,7 @@ const SequenceDetails: React.FC<SequenceDetailsProps> = ({
|
|||||||
editMode = false,
|
editMode = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { sequenceId } = useParams<{ sequenceId: string }>();
|
const { sequenceId } = useParams<{ sequenceId: string }>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelSeed = t("Seed");
|
const labelSeed = t("Seed");
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const SequenceTable: React.FC<PublishedTableProps<ReadSequence>> = ({
|
|||||||
onDelete,
|
onDelete,
|
||||||
onSort,
|
onSort,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<ReadSequence>[] = useMemo(
|
const columns: Column<ReadSequence>[] = useMemo(
|
||||||
() => [{ key: "name", label: t("Name"), order: "asc" }],
|
() => [{ key: "name", label: t("Name"), order: "asc" }],
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import Loading from "../../../components/common/Loading";
|
|||||||
import Permission from "../../../components/common/Permission";
|
import Permission from "../../../components/common/Permission";
|
||||||
|
|
||||||
const Sequence: React.FC = () => {
|
const Sequence: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<ReadSequence>>({
|
const [pagedData, setPagedData] = useState<Paginated<ReadSequence>>({
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|||||||
@ -26,7 +26,7 @@ const SiteDetails: React.FC<SiteDetailsProps> = ({ editMode = false }) => {
|
|||||||
organisationId: string;
|
organisationId: string;
|
||||||
siteId?: string;
|
siteId?: string;
|
||||||
}>();
|
}>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelAddress = t("Address");
|
const labelAddress = t("Address");
|
||||||
|
|||||||
@ -19,7 +19,7 @@ const initialPagedData: Paginated<ReadSite> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Sites: React.FC = () => {
|
const Sites: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const { organisationId } = useParams<{ organisationId: string }>();
|
const { organisationId } = useParams<{ organisationId: string }>();
|
||||||
|
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
|
|||||||
@ -17,7 +17,7 @@ const SitesTable: React.FC<PublishedTableProps<ReadSite>> = ({
|
|||||||
onDelete,
|
onDelete,
|
||||||
onSort,
|
onSort,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<ReadSite>[] = useMemo(
|
const columns: Column<ReadSite>[] = useMemo(
|
||||||
() => [
|
() => [
|
||||||
|
|||||||
@ -21,7 +21,7 @@ const initialPagedData: Paginated<ReadSpecification> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Specifications: React.FC = () => {
|
const Specifications: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const { siteId } = useParams<{ siteId: string }>();
|
const { siteId } = useParams<{ siteId: string }>();
|
||||||
|
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
|
|||||||
@ -35,7 +35,7 @@ const SpecificationsDetails: React.FC<SpecificationsDetailsProps> = ({
|
|||||||
siteId: string;
|
siteId: string;
|
||||||
specificationId?: string;
|
specificationId?: string;
|
||||||
}>();
|
}>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const TemplateFillerRef = useRef<TemplateFillerHandle>(null);
|
const TemplateFillerRef = useRef<TemplateFillerHandle>(null);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const SpecificationsTable: React.FC<PublishedTableProps<ReadSpecification>> = ({
|
|||||||
onDelete,
|
onDelete,
|
||||||
onSort,
|
onSort,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<ReadSpecification>[] = useMemo(
|
const columns: Column<ReadSpecification>[] = useMemo(
|
||||||
() => [{ key: "name", label: t("Name"), order: "asc" }],
|
() => [{ key: "name", label: t("Name"), order: "asc" }],
|
||||||
|
|||||||
@ -24,7 +24,7 @@ const SsoProviderDetails: React.FC<SsoProviderDetailsProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const { ssoProviderId } = useParams<{ ssoProviderId: string }>();
|
const { ssoProviderId } = useParams<{ ssoProviderId: string }>();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelName = t("Name");
|
const labelName = t("Name");
|
||||||
const labelClientId = t("ClientId");
|
const labelClientId = t("ClientId");
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const SsoManagerTable: React.FC<PublishedTableProps<GetSsoProvider>> = ({
|
|||||||
onDelete,
|
onDelete,
|
||||||
onSort,
|
onSort,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const columns: Column<GetSsoProvider>[] = useMemo(
|
const columns: Column<GetSsoProvider>[] = useMemo(
|
||||||
() => [{ key: "name", label: t("Name"), order: "asc" }],
|
() => [{ key: "name", label: t("Name"), order: "asc" }],
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import Loading from "../../../components/common/Loading";
|
|||||||
import Permission from "../../../components/common/Permission";
|
import Permission from "../../../components/common/Permission";
|
||||||
|
|
||||||
const SsoManager: React.FC = () => {
|
const SsoManager: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<GetSsoProvider>>({
|
const [pagedData, setPagedData] = useState<Paginated<GetSsoProvider>>({
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|||||||
@ -10,7 +10,7 @@ interface UserDetailsProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const UserDetails: React.FC<UserDetailsProps> = ({ editMode }) => {
|
const UserDetails: React.FC<UserDetailsProps> = ({ editMode }) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const heading = editMode ? t("EditUser") : t("AddUser");
|
const heading = editMode ? t("EditUser") : t("AddUser");
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ interface GeneralTabProps {
|
|||||||
|
|
||||||
const GeneralTab: React.FC<GeneralTabProps> = ({ isEditMode }) => {
|
const GeneralTab: React.FC<GeneralTabProps> = ({ isEditMode }) => {
|
||||||
const { userId } = useParams<{ userId: string }>();
|
const { userId } = useParams<{ userId: string }>();
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
const labelFirstName = t("FirstName");
|
const labelFirstName = t("FirstName");
|
||||||
const labelMiddleNames = t("MiddleNames");
|
const labelMiddleNames = t("MiddleNames");
|
||||||
|
|||||||
@ -24,7 +24,7 @@ const UsersTable: React.FC<UsersTableProps> = ({
|
|||||||
onSort,
|
onSort,
|
||||||
resendConfirmEmail,
|
resendConfirmEmail,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const canResendConfirmMail = authentication.hasAccess("ResendConfirmMail");
|
const canResendConfirmMail = authentication.hasAccess("ResendConfirmMail");
|
||||||
|
|
||||||
const resendConfirmEmailHandler = useCallback(
|
const resendConfirmEmailHandler = useCallback(
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import Loading from "../../../components/common/Loading";
|
|||||||
import Permission from "../../../components/common/Permission";
|
import Permission from "../../../components/common/Permission";
|
||||||
|
|
||||||
const Users: React.FC = () => {
|
const Users: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<GetUser>>({
|
const [pagedData, setPagedData] = useState<Paginated<GetUser>>({
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import TasksTab from "./components/TasksTab";
|
|||||||
const WorkflowTemplateDetails: React.FC<{ editMode: boolean }> = ({
|
const WorkflowTemplateDetails: React.FC<{ editMode: boolean }> = ({
|
||||||
editMode,
|
editMode,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const { userId } = useParams<{ userId: string }>();
|
const { userId } = useParams<{ userId: string }>();
|
||||||
const [activeTab, setActiveTab] = React.useState("general");
|
const [activeTab, setActiveTab] = React.useState("general");
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import workflowTemplatesService, {
|
|||||||
import WorkflowTemplateManagerTable from "./components/WorkflowTemplateTable";
|
import WorkflowTemplateManagerTable from "./components/WorkflowTemplateTable";
|
||||||
|
|
||||||
const WotkflowTemplateManager: React.FC = () => {
|
const WotkflowTemplateManager: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [pagedData, setPagedData] = useState<Paginated<ReadWorkflowTemplate>>({
|
const [pagedData, setPagedData] = useState<Paginated<ReadWorkflowTemplate>>({
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|||||||
@ -2,6 +2,8 @@ import React from "react";
|
|||||||
import templateVersionsService, {
|
import templateVersionsService, {
|
||||||
TaskMetadata,
|
TaskMetadata,
|
||||||
} from "../services/WorkflowTemplateService";
|
} from "../services/WorkflowTemplateService";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Namespaces } from "../../../../i18n/i18n";
|
||||||
|
|
||||||
interface AddTaskButtonProps {
|
interface AddTaskButtonProps {
|
||||||
taskType: string;
|
taskType: string;
|
||||||
@ -13,6 +15,9 @@ const AddTaskButton: React.FC<AddTaskButtonProps> = ({ taskType, onAdd }) => {
|
|||||||
const [items, setItems] = React.useState<TaskMetadata[]>([]);
|
const [items, setItems] = React.useState<TaskMetadata[]>([]);
|
||||||
const [loading, setLoading] = React.useState(false);
|
const [loading, setLoading] = React.useState(false);
|
||||||
|
|
||||||
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
const { t: tTaskType } = useTranslation(Namespaces.TaskTypes);
|
||||||
|
|
||||||
const toggle = async () => {
|
const toggle = async () => {
|
||||||
const next = !open;
|
const next = !open;
|
||||||
setOpen(next);
|
setOpen(next);
|
||||||
@ -32,12 +37,12 @@ const AddTaskButton: React.FC<AddTaskButtonProps> = ({ taskType, onAdd }) => {
|
|||||||
return (
|
return (
|
||||||
<div className="add-task-button">
|
<div className="add-task-button">
|
||||||
<button className="btn btn-secondary" type="button" onClick={toggle}>
|
<button className="btn btn-secondary" type="button" onClick={toggle}>
|
||||||
Add Task
|
{t("AddTask")}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{open && (
|
{open && (
|
||||||
<div className="dropdown-menu show">
|
<div className="dropdown-menu show">
|
||||||
{loading && <div className="dropdown-item">Loading…</div>}
|
{loading && <div className="dropdown-item">{t("Loading")}</div>}
|
||||||
|
|
||||||
{!loading &&
|
{!loading &&
|
||||||
items.map((item) => (
|
items.map((item) => (
|
||||||
@ -49,7 +54,7 @@ const AddTaskButton: React.FC<AddTaskButtonProps> = ({ taskType, onAdd }) => {
|
|||||||
setOpen(false);
|
setOpen(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{item.displayName}
|
{tTaskType(item.displayName)}
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -24,7 +24,7 @@ const GeneralTab: React.FC<GeneralTabProps> = ({
|
|||||||
onFieldChange,
|
onFieldChange,
|
||||||
handleDomainPickerChange,
|
handleDomainPickerChange,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { ReadWorkflowTemplate } from "../services/WorkflowTemplateService";
|
|||||||
const WorkflowTemplateManagerTable: React.FC<
|
const WorkflowTemplateManagerTable: React.FC<
|
||||||
PublishedTableProps<ReadWorkflowTemplate>
|
PublishedTableProps<ReadWorkflowTemplate>
|
||||||
> = ({ data, sortColumn, onChangePage, onSearch, onDelete, onSort }) => {
|
> = ({ data, sortColumn, onChangePage, onSearch, onDelete, onSort }) => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
const canViewSite = authentication.hasAccess("ViewSite");
|
const canViewSite = authentication.hasAccess("ViewSite");
|
||||||
|
|
||||||
const columns: Column<ReadWorkflowTemplate>[] = useMemo(
|
const columns: Column<ReadWorkflowTemplate>[] = useMemo(
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import {
|
|||||||
} from "../../../components/common/formHelpers";
|
} from "../../../components/common/formHelpers";
|
||||||
|
|
||||||
const InternalProfile: React.FC = () => {
|
const InternalProfile: React.FC = () => {
|
||||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
const { t } = useTranslation(Namespaces.Common);
|
||||||
//Internal login version
|
//Internal login version
|
||||||
const labelFirstName = t("FirstName");
|
const labelFirstName = t("FirstName");
|
||||||
const labelMiddleNames = t("MiddleNames");
|
const labelMiddleNames = t("MiddleNames");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user