Skip to content

Commit

Permalink
russian roles
Browse files Browse the repository at this point in the history
  • Loading branch information
polinaKoroleva05 committed Dec 15, 2024
1 parent 6f94163 commit 7f2693a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/pages/manyEntity/AllUsersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
GET_ALL_USERS_URL,
POST_NEW_USER_URL,
usersDefaultFilter,
usersInit,
usersInit, roles
} from "../../serviceFiles/constants";
import Addition from "../../components/Addition";
import axios from "axios";
Expand Down Expand Up @@ -83,7 +83,7 @@ export default function AllUsersPage() {
<td>{user._key}</td>
<td>{user.nameSurnamePatronymic}</td>
<td>{user.login}</td>
<td>{user.role}</td>
<td>{roles[user.role]}</td>
<td>{user.regDate}</td>
<td>{user.birthday}</td>
<td>{user.editDate}</td>
Expand Down
21 changes: 19 additions & 2 deletions client/src/serviceFiles/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export let eventDefaultFilter = {
export let usersInit = [{
_key: '1',
nameSurnamePatronymic: "Крупская Ольга Дмитриевна",
role: "Client",
role: "lord",
login: "LOGIN_1",
password: "123pass",
birthday: "1980-01-13",
Expand All @@ -80,7 +80,7 @@ export let usersInit = [{
}, {
_key: '2',
nameSurnamePatronymic: "Королева Полина Андреевна",
role: "User",
role: "client",
login: "LOGIN_2",
password: "111",
birthday: "2000-01-13",
Expand All @@ -105,6 +105,23 @@ export let usersDefaultFilter = {
endregDate: "2050-12-12T00:00",
}

interface Role{
[key: string]: string,
administrator: string,
employee: string,
director: string,
lord: string,
client: string
}

export let roles : Role = {
administrator: "Администратор",
employee: "Работник",
director: "Директор",
lord: "Владелец бизнеса",
client: "Клиент"
}

export let warehousesInit = [
{
_key: '1',
Expand Down

0 comments on commit 7f2693a

Please sign in to comment.