add task modal

dilmurod
Dilmurod 1 month ago
parent 55bd0ab315
commit d47a38d919

@ -743,12 +743,6 @@
cursor: pointer; cursor: pointer;
} }
.ant-upload-wrapper .ant-upload-drag {
border: 0.5px solid rgba(215, 216, 224, 1);
padding: 25px 0;
color: #333333;
}
.card_stat { .card_stat {
/* font-weight: 500; */ /* font-weight: 500; */
/* font-size: 20px; */ /* font-size: 20px; */
@ -814,8 +808,8 @@
} }
.ant-upload-list-text { .ant-upload-list-text {
overflow: scroll; /* overflow: scroll; */
height: 50px; height: 0;
} }
.ant-modal-mask { .ant-modal-mask {

@ -30,6 +30,7 @@ import tt from "../../assets/tticon.svg";
import addicon from "../../assets/addiconpng.png"; import addicon from "../../assets/addiconpng.png";
//ts-ignore //ts-ignore
import fileUpload from "../../assets/upload-file.png"; import fileUpload from "../../assets/upload-file.png";
import closeIcon from "../../assets/closeIcon.png";
import AddCustomer from "../Customers/AddCustomer"; import AddCustomer from "../Customers/AddCustomer";
import AddDriver from "../Companies/AddDriver"; import AddDriver from "../Companies/AddDriver";
@ -184,9 +185,26 @@ const AddTask = ({
<Modal <Modal
open={open} open={open}
width={600} width={600}
title="Add task" title={
<div
style={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
}}
>
<span>Add Task</span>
<Button type="text" onClick={handleCancel}>
<img src={closeIcon} />
</Button>
</div>
}
okText="Create" okText="Create"
cancelText="Cancel" cancelText="Cancel"
centered={false}
bodyStyle={{
height: 685,
}}
onCancel={handleCancel} onCancel={handleCancel}
onOk={() => { onOk={() => {
form.validateFields().then(async (values) => { form.validateFields().then(async (values) => {
@ -277,9 +295,6 @@ const AddTask = ({
onClick={(e) => setDriverOpen(true)} onClick={(e) => setDriverOpen(true)}
type="primary" type="primary"
style={{ style={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
marginTop: 5, marginTop: 5,
marginLeft: 3, marginLeft: 3,
}} }}
@ -325,7 +340,7 @@ const AddTask = ({
</FormAnt.Item> </FormAnt.Item>
</Col> </Col>
<Col span={isMobile ? 12 : 12}> <Col span={12}>
<FormAnt.Item <FormAnt.Item
label="Status" label="Status"
name="status" name="status"
@ -344,7 +359,7 @@ const AddTask = ({
</FormAnt.Item> </FormAnt.Item>
</Col> </Col>
<Col span={isMobile ? 12 : 12}> <Col span={12}>
<FormAnt.Item <FormAnt.Item
label="PTI" label="PTI"
name="pti" name="pti"
@ -366,7 +381,7 @@ const AddTask = ({
> >
<TextArea <TextArea
style={{ padding: "7px 11px" }} style={{ padding: "7px 11px" }}
placeholder="note" placeholder="Note"
autoSize={{ minRows: isMobile ? 1 : 2, maxRows: 1 }} autoSize={{ minRows: isMobile ? 1 : 2, maxRows: 1 }}
onChange={changeText} onChange={changeText}
value={text} value={text}
@ -396,19 +411,18 @@ const AddTask = ({
/> />
</div> </div>
)} )}
<br />
</FormAnt.Item> </FormAnt.Item>
</Col> </Col>
</Row> </Row>
</FormAnt> </FormAnt>
<FormAnt> <FormAnt>
<Row gutter={[16, 16]}> <Row gutter={[16, 0]}>
<Col span={isMobile ? 6 : 24}> <Col span={isMobile ? 6 : 24}>
<FormAnt.Item name="attachment"> <FormAnt.Item name="attachment">
<div> <div>
<Upload.Dragger <Upload.Dragger
name="file" name="file"
height={174} height={100}
multiple={true} multiple={true}
customRequest={({ file, onSuccess }: any) => { customRequest={({ file, onSuccess }: any) => {
const formData = new FormData(); const formData = new FormData();
@ -426,7 +440,10 @@ const AddTask = ({
}} }}
> >
{!isMobile ? ( {!isMobile ? (
<p className={`ant-upload-drag-icon`}> <p
className={`ant-upload-drag-icon`}
style={{ margin: 0 }}
>
<img src={fileUpload} /> <img src={fileUpload} />
</p> </p>
) : ( ) : (
@ -442,9 +459,8 @@ const AddTask = ({
Click to select Click to select
</span> </span>
<br /> <br />
<span style={{ fontSize: 13 }}> <span style={{ fontSize: 12 }}>
Maximum file size is 10 MB <br /> Maximum file size is 10 MB
(only .jpeg .jpg .png .pdf)
</span> </span>
</p> </p>
)} )}

@ -338,8 +338,8 @@ const TaskTable = ({
style={{ style={{
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "space-between", justifyContent: "start",
gap: 10, gap: 5,
}} }}
> >
<Tooltip placement="topLeft" title={note}> <Tooltip placement="topLeft" title={note}>

Loading…
Cancel
Save