diff --git a/client/src/components/Filter.tsx b/client/src/components/Filter.tsx index 6533797..5ae43f2 100644 --- a/client/src/components/Filter.tsx +++ b/client/src/components/Filter.tsx @@ -13,58 +13,60 @@ export default function Filter(props: { handleSend: any, obj: any, default: any } const filters = [] for (let key in props.obj) { - filters.push( - - {props.obj[key].name} - {props.obj[key].type == "b" && } - {["s", "select_dynamic"].includes(props.obj[key].type) &&
} - { - props.obj[key].type == "d" &&
} - { - props.obj[key].type == "dt" &&
} - { - props.obj[key].type == "n" &&
} - { - props.obj[key].type == "nf" &&
+ {props.obj[key].name} + {props.obj[key].type == "b" && } + {["s", "select_dynamic"].includes(props.obj[key].type) &&
} + { + props.obj[key].type == "d" &&
} + { + props.obj[key].type == "dt" &&
- } - { - props.obj[key].type == "l" && - } - {props.obj[key].type == "select_const" && {props.obj[key].options.map((role: string) => )}} - - ) + />
} + { + props.obj[key].type == "n" &&
} + { + props.obj[key].type == "nf" &&
+ } + { + props.obj[key].type == "l" && + } + {props.obj[key].type == "select_const" && {props.obj[key].options.map((role: string) => )}} +
+ ) + } } return (<> diff --git a/client/src/serviceFiles/constants.ts b/client/src/serviceFiles/constants.ts index f4f203f..29e4ec0 100644 --- a/client/src/serviceFiles/constants.ts +++ b/client/src/serviceFiles/constants.ts @@ -71,6 +71,7 @@ export let usersInit = [{ nameSurnamePatronymic: "Крупская Ольга Дмитриевна", role: "Client", login: "LOGIN_1", + password: "123pass", birthday: "1980-01-13", regDate: "2024-01-13", editDate: "2024-01-13", @@ -81,6 +82,7 @@ export let usersInit = [{ nameSurnamePatronymic: "Королева Полина Андреевна", role: "User", login: "LOGIN_2", + password: "111", birthday: "2000-01-13", regDate: "2024-01-13", editDate: "2024-01-13", diff --git a/client/src/serviceFiles/types.ts b/client/src/serviceFiles/types.ts index 88ba44b..19f9a9d 100644 --- a/client/src/serviceFiles/types.ts +++ b/client/src/serviceFiles/types.ts @@ -43,6 +43,7 @@ export type User = { nameSurnamePatronymic: string, role: string, login: string, + password: string, birthday: string, regDate: string, editDate: string, @@ -55,6 +56,7 @@ export let userFields = { nameSurnamePatronymic: { name: "ФИО", type: "s" }, role: { name: "Роль", type: "select_const", options: [["", "Любая"], ["administrator", "Администратор"], ["employee", "Работник"], ["director", "Директор"], ["lord", "Владелец бизнеса"], ["client", "Клиент"]] }, login: { name: "Почта", type: "s" }, + password: {name: "Пароль", type: "s", noNeedFiltration: true}, birthday: { name: "Дата рождения", type: "d" }, regDate: { name: "Дата регистрации", type: "dt", noNeedAddition: true }, editDate: { name: "Дата обновления", type: "dt", noNeedAddition: true }, diff --git a/server/Models/User.cs b/server/Models/User.cs index 1a14ad0..7fe06b0 100644 --- a/server/Models/User.cs +++ b/server/Models/User.cs @@ -21,7 +21,7 @@ public User(string NSP, string role, string login, string psw, string bd) this.indebtedness = 0; } - public string _key { get; set; } + public string? _key { get; set; } public string? nameSurnamePatronymic { get; set; }