Browse Source

FIX | alert z-index

stage
Vitalik 4 months ago
parent
commit
be6fd00162
  1. 8
      src/components/SmartComponents/UserSelectWithSearch.tsx
  2. 2
      src/containers/Chats/plugins/chat-item-file.component.tsx
  3. 5
      src/scss/main.scss
  4. 4
      src/shared/helpers/chat.helpers.ts

8
src/components/SmartComponents/UserSelectWithSearch.tsx

@ -270,13 +270,19 @@ export const UserSelectWithSearch: FC<IUserSelectWithSearchProps> = ({ @@ -270,13 +270,19 @@ export const UserSelectWithSearch: FC<IUserSelectWithSearchProps> = ({
);
};
const getValue = () => {
if (!value) return input?.value;
if (Number(value) === -1) return "Видалений користувач";
return value;
};
return (
<div className="form__form-group select-field select-field_custom">
{label ? <div className="label">{label}</div> : null}
<Select
{...selectProps}
value={value || input?.value}
value={getValue()}
showSearch
showArrow
loading={userPaginationList.isLoading}

2
src/containers/Chats/plugins/chat-item-file.component.tsx

@ -38,7 +38,7 @@ export const ChatItemFile: FC<ChatItemFileProps> = (props) => { @@ -38,7 +38,7 @@ export const ChatItemFile: FC<ChatItemFileProps> = (props) => {
return `${convertToMegabytes(props.content.size)} MБ - `;
}, [props.content.size]);
const fileType = props?.content?.fileUrl.split(".").pop();
const fileType = props?.content?.fileUrl?.split(".").pop();
return (
<>

5
src/scss/main.scss

@ -599,3 +599,8 @@ input[type="number"] { @@ -599,3 +599,8 @@ input[type="number"] {
padding-right: 8px;
}
}
.ant-notification {
z-index: 9999999;
}

4
src/shared/helpers/chat.helpers.ts

@ -3,7 +3,7 @@ import { ChatMemberRole, MessageType } from "../enums"; @@ -3,7 +3,7 @@ import { ChatMemberRole, MessageType } from "../enums";
const regexToMatch = /@\[([^[]*)]\(([^(^)]*)\)/g;
const parseMentionsMessage = (message: string, regex: RegExp): string => {
const subst = ` @$1 `;
const result = message.replace(regex, subst);
const result = message?.replace(regex, subst);
return result;
};
@ -53,7 +53,7 @@ export const createFullName = ( @@ -53,7 +53,7 @@ export const createFullName = (
firstName?: string,
middleName?: string,
lastName?: string
) => [lastName, firstName, middleName].filter(it => it).join(" ");
) => [lastName, firstName, middleName].filter((it) => it).join(" ");
export const createFullRolePreviewText = (role: ChatMemberRole) => {
switch (role) {

Loading…
Cancel
Save