Browse Source

BUGFIX | different WEB app issues (#24)

Web. Chat room. Delete a message action. The text on the confirmation modal is incorrect

Web. Адмін. Журнал ІР. Написи на кнопках "Чорний список" та "Білий список" не вирівняні по вертикалі

ВЕБ. Админ. Друк звіту "Підрахунок поставлених користувачем задач". Немає назви звіту і зазначається користувач, який формує звіт, а не користувач, по якому сформовано звіт

WEB. Після видалення користувача як керівника підприємства з картки підприємства, він все ще може переглядати перелік завдань і додавати коментарі

Reviewed-on: #24
Co-authored-by: Yevhen Romanenko <yevhen.romanenko.jetup@gmail.com>
Co-committed-by: Yevhen Romanenko <yevhen.romanenko.jetup@gmail.com>
pull/25/head
Yevhen Romanenko 7 months ago committed by Vitalik Yatsenko
parent
commit
8106890523
  1. 2
      src/config/index.ts
  2. 7
      src/containers/Chats/modals/chat-confirm-delete-modal.tsx
  3. 6
      src/containers/Factory/hooks/use-factory.hook.ts
  4. 19
      src/containers/Ips/components/Data/index.tsx
  5. 20
      src/containers/Profile/components/CountTask/components/print.component.tsx
  6. 2
      src/containers/Profile/components/CountTask/count-task.component.tsx
  7. 4
      src/services/domain/factories.service.ts

2
src/config/index.ts

@ -4,7 +4,7 @@ export const config = { @@ -4,7 +4,7 @@ export const config = {
// apiUrl: "http://localhost:3000/",
// apiUrl: "http://185.69.154.136:5000/admin/",
// apiUrl: "http://185.69.154.136:5000/",
// socketUrl: "http://185.69.154.136:5000",
// socketUrl: "http://localhost:3000/",
apiUrl: "https://taskme-api.work-jetup.site/",
socketUrl: "https://taskme-api.work-jetup.site",

7
src/containers/Chats/modals/chat-confirm-delete-modal.tsx

@ -1,11 +1,9 @@ @@ -1,11 +1,9 @@
import React, { useState } from "react";
import { chatMessagesService } from "@/services/domain";
import { IChatMessage, useEventsListener } from "@/shared";
import React, { useState } from "react";
import Modal from "../../../components/Modal";
import { IChatMessage as IChatMessageItem } from "../plugins/interfaces";
// import "./styles.scss";
export const ChatConfirmDeleteModal = () => {
const [isOpen, setIsOpen] = useState(false);
const [item, setItem] = useState<IChatMessage | Partial<IChatMessageItem>[]>(
@ -47,14 +45,13 @@ export const ChatConfirmDeleteModal = () => { @@ -47,14 +45,13 @@ export const ChatConfirmDeleteModal = () => {
<Modal full show={isOpen} toggle={toogle}>
<div className="confirm-modal">
<span className="message">
{`Ви впенені, що хочете \n видалити повідомлення?`}
{`Ви впевнені, що хочете видалити повідомлення?`}
</span>
<div className="button-bar">
<button
className="confirm-btn"
onClick={() => {
// onCancel && onCancel();
toogle();
}}
>

6
src/containers/Factory/hooks/use-factory.hook.ts

@ -42,7 +42,7 @@ export const useFactory = () => { @@ -42,7 +42,7 @@ export const useFactory = () => {
const updateFactory = async (factory: IUpdateFactory) => {
const updatedFactory = await factoriesService.updateFactory(factory);
factories.forEach(it => {
factories.forEach((it) => {
if (it.id !== factory.id) return it;
else return updatedFactory;
});
@ -54,7 +54,7 @@ export const useFactory = () => { @@ -54,7 +54,7 @@ export const useFactory = () => {
const deleteFactory = async (id: number) => {
await factoriesService.deleteFactory(id);
factories.filter(it => it.id !== id);
factories.filter((it) => it.id !== id);
setFactories(factories);
setRefetch(true);
@ -65,6 +65,6 @@ export const useFactory = () => { @@ -65,6 +65,6 @@ export const useFactory = () => {
isLoading,
createFactory,
updateFactory,
deleteFactory
deleteFactory,
};
};

19
src/containers/Ips/components/Data/index.tsx

@ -37,8 +37,10 @@ export const IpsTable = () => { @@ -37,8 +37,10 @@ export const IpsTable = () => {
const styles = {
radioBtn: {
display: "flex",
justifyContent: "center",
alignItems: "center",
borderRadius: 10,
padding: "6px 20px 0px 20px",
height: 46,
fontSize: 16,
color: "#7F7F7F",
@ -46,8 +48,10 @@ export const IpsTable = () => { @@ -46,8 +48,10 @@ export const IpsTable = () => {
width: 156,
},
checkedRadio: {
display: "flex",
justifyContent: "center",
alignItems: "center",
borderRadius: 10,
padding: "6px 20px 0px 20px",
height: 46,
fontSize: 16,
color: "#9E2743",
@ -175,7 +179,12 @@ export const IpsTable = () => { @@ -175,7 +179,12 @@ export const IpsTable = () => {
}}
>
<Radio.Group
style={{ display: "flex" }}
style={{
display: "flex",
flexDirection: "row",
gap: "20px",
textAlign: "center",
}}
value={listType}
onChange={(e) => {
setListType(e.target.value);
@ -183,7 +192,7 @@ export const IpsTable = () => { @@ -183,7 +192,7 @@ export const IpsTable = () => {
setActive(!active);
}}
>
<div style={{ textAlign: "center" }}>
<div>
<Radio.Button
style={!active ? styles.radioBtn : styles.checkedRadio}
value={IPListType.White}
@ -191,7 +200,7 @@ export const IpsTable = () => { @@ -191,7 +200,7 @@ export const IpsTable = () => {
Білий список
</Radio.Button>
</div>
<div style={{ marginLeft: 20 }}>
<div>
<Radio.Button
style={active ? styles.radioBtn : styles.checkedRadio}
value={IPListType.Black}

20
src/containers/Profile/components/CountTask/components/print.component.tsx

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
/* eslint-disable react/display-name */
import React from "react";
import moment from "moment";
import { IUser } from "@/shared";
import { IUser, createFullName } from "@/shared";
interface IProps {
profile: IUser;
@ -18,12 +18,24 @@ interface IProps { @@ -18,12 +18,24 @@ interface IProps {
export const PrintComponent = React.forwardRef(
(props: IProps, ref: React.RefObject<HTMLDivElement>) => {
const { profile, startDate, endDate, taskCounts } = props;
const fullName = createFullName(
profile.info.firstName,
profile.info.middleName,
profile.info.lastName
);
return (
<div ref={ref} className="print-content-block" style={{ padding: 50 }}>
<p style={{ fontSize: "18px", textDecoration: "underline" }}>
<p style={{ fontSize: "18px" }}>
<strong>{fullName} </strong>
<i>{`(${profile?.info?.position ? profile?.info?.position : ""}${
profile?.info?.position && profile?.factoryName ? `, ` : ""
}${profile?.factoryName ? `${profile?.factoryName}` : ""})`}</i>
</p>
<p style={{ fontSize: "18px", marginTop: "0px" }}>
<strong>
{profile.info.lastName} {profile.info.middleName}{" "}
{profile.info.firstName} ({moment(startDate).format("DD-MM-YYYY")} -{" "}
({moment(startDate).format("DD-MM-YYYY")} -{" "}
{moment(endDate).format("DD-MM-YYYY")})
</strong>
</p>

2
src/containers/Profile/components/CountTask/count-task.component.tsx

@ -171,7 +171,7 @@ export const CountTask: FC<IProps> = ({ @@ -171,7 +171,7 @@ export const CountTask: FC<IProps> = ({
total: countTasksStatsValue.all,
}}
// taskCountsStats={countTasksStatsValue}
profile={authProfile}
profile={profile}
startDate={dateValues.from}
endDate={dateValues.to}
/>

4
src/services/domain/factories.service.ts

@ -3,7 +3,7 @@ import { IFactory } from "@/shared"; @@ -3,7 +3,7 @@ import { IFactory } from "@/shared";
import { factoriesApi } from "@/api";
import {
ICreateFactory,
IUpdateFactory
IUpdateFactory,
} from "@/api/factories/requests.interface";
import { FactoriesIsLoading } from "@/store/factories";
@ -61,5 +61,5 @@ export const factoriesService = { @@ -61,5 +61,5 @@ export const factoriesService = {
fetchFactories,
createFactory,
updateFactory,
deleteFactory
deleteFactory,
};

Loading…
Cancel
Save