EditApprovalMatrix.js 30.9 KB
Newer Older
1
import React, { Component } from 'react';
2 3
import { TextField, Typography } from '@material-ui/core';
import { DateTimePicker, KeyboardDatePicker, DatePicker} from "@material-ui/pickers";
4 5
import Autocomplete from '@material-ui/lab/Autocomplete';
import * as R from 'ramda'
6
import format from "date-fns/format";
7
import api from "../../api";
d.arizona's avatar
d.arizona committed
8
import Images from '../../assets/Images';
a.bairuha's avatar
a.bairuha committed
9
import Constant from '../../library/Constant';
10 11

export default class EditApprovalMatrix extends Component {
12 13 14
    constructor(props) {
        super(props)
        this.state = {
15 16
            id: '',
            order: '',
17
            status: "",
18 19
            startDate: null,
            endDate: null,
20 21
            date: new Date(),
            approvedBy: null,
22 23 24 25
            getApprovedBy: null,
            types: null,
            getTypes: null,
            operators: null,
26
            getOperators: null,
27 28 29 30 31 32
            errorType: false,
            msgErrType: '',
            errorApproved: false,
            msgErrApproved: '',
            errorOperator: false,
            msgErrOperator: '',
33 34 35 36 37 38
            errorOrder: false,
            msgErrOrder: '',
            errorStartDate: false,
            errorEndDate: false,
            msgErrorStartDate: "",
            msgErrorEndDate: ""
39 40 41 42
        }
    }

    componentDidMount() {
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
43
        if (this.props.type === 'edit') {
44
            this.getDetailAM()
45 46 47
            // let getApprovedBy = {
            //     user_id: data.user_id,
            //     fullname: data.fullname
48
            // })
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
49
        }
50 51 52 53
    }

    getDetailAM() {
        api.create().getDetailAM(this.props.data[1]).then(response => {
Riri Novita's avatar
Riri Novita committed
54
            console.log(response)
55
            if (response.data) {
a.bairuha's avatar
a.bairuha committed
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
                if (response.ok) {
                    if (response.data.status === "success") {
                        let data = response.data.data
                        this.setState({
                            id: data.approval_matrix_id,
                            startDate: data.start_date,
                            endDate: data.end_date,
                            order: data.orders,
                            getUserId: data.user_id,
                            getTypeId: data.approval_type_id,
                            getOperatorId: data.operator_type_id,
                            status: data.status,
                            created: data.created,
                            updated: data.updated === null ? "" : data.updated 
                        }, () => this.getUserData(), this.getTypeData(), this.getOperatorData())
                    } else {
                        this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
d.arizona's avatar
d.arizona committed
73
                            if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
a.bairuha's avatar
a.bairuha committed
74 75 76 77 78 79 80 81 82
                                setTimeout(() => {
                                    localStorage.removeItem(Constant.TOKEN)
                                    window.location.reload();
                                }, 1000);
                            }
                        })
                    }
                } else {
                    this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
83
                }
a.bairuha's avatar
a.bairuha committed
84 85
            } else {
                this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
86 87
            }
        })
88 89 90 91
    }

    getUserData() {
        api.create().getApprovedByAM().then((response) => {
Riri Novita's avatar
Riri Novita committed
92 93
            console.log(response);
            console.log(this.state.getUserId);
a.bairuha's avatar
a.bairuha committed
94 95 96 97 98 99 100
            if (response.data) {
                if (response.ok) {
                    if (response.data.status == 'success') {
                        let data = response.data.data
                        let userData = data.map((item) => {
                            return {
                                user_id: item.user_id,
d.arizona's avatar
d.arizona committed
101
                                fullname: item.fullname == null? "(NO_NAME)" : item.fullname
a.bairuha's avatar
a.bairuha committed
102 103 104 105 106 107 108 109 110 111 112 113
                            }
                        })
                        let index = userData.findIndex((val) => val.user_id == this.state.getUserId)
                        let defaultProps = {
                            options: userData,
                            getOptionLabel: (option) => option.fullname,
                        };
                        // this.setState({ approvedBy: defaultProps, userData: response.data.data, getApprovedBy: index == -1 ? userData[0]: userData[index] })
                        this.setState({ approvedBy: defaultProps, userData: response.data.data, getApprovedBy: index == -1 ? this.setState({ errorApproved: true, msgErrApproved: 'Approver Name has been Inactive.' }): userData[index] })
                        
                    } else {
                        // alert('Pemberi Persetujuan: ' +response.data.message)
d.arizona's avatar
d.arizona committed
114
                        if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
a.bairuha's avatar
a.bairuha committed
115 116 117 118 119 120 121 122 123
                            this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
                                setTimeout(() => {
                                    localStorage.removeItem(Constant.TOKEN)
                                    window.location.reload();
                                }, 1000);
                            })
                        } else {
                            this.setState({ alert: true, messageAlert: 'Pemberi Persetujuan: ' +response.data.message, tipeAlert: 'error' })
                        }
124
                    }
a.bairuha's avatar
a.bairuha committed
125 126 127
                } else {
                    this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
                }
128
            } else {
a.bairuha's avatar
a.bairuha committed
129
                this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
130 131
            }
        })
132 133
    }

134 135
    getOperatorData() {
        api.create().getOperatorAM().then((response) => {
a.bairuha's avatar
a.bairuha committed
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
            if (response.data) {
                if (response.ok) {
                    if (response.data.status == 'success') {
                        let data = response.data.data
                        let operatorData = data.map((item) => {
                            return {
                                operator_type_id: item.operator_type_id,
                                operator_type_name: item.operator_type_name
                            }
                        })
                        let index = operatorData.findIndex((val) => val.operator_type_id == this.state.getOperatorId)
                        let operatorProps = {
                            options: operatorData,
                            getOptionLabel: (option) => option.operator_type_name,
                        };
                        this.setState({ operators: operatorProps, operatorData: response.data.data, getOperators: index == -1 ? operatorData[0]: operatorData[index] })                
                    } else {
                        // alert('Operator: ' +response.data.message)
d.arizona's avatar
d.arizona committed
154
                        if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
a.bairuha's avatar
a.bairuha committed
155 156 157 158 159 160 161 162 163
                            this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
                                setTimeout(() => {
                                    localStorage.removeItem(Constant.TOKEN)
                                    window.location.reload();
                                }, 1000);
                            })
                        } else {
                            this.setState({ alert: true, messageAlert: 'Operator: ' +response.data.message, tipeAlert: 'error' })
                        }
164
                    }
a.bairuha's avatar
a.bairuha committed
165 166 167
                } else {
                    this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
                }
168
            } else {
a.bairuha's avatar
a.bairuha committed
169
                this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
170 171 172 173 174 175
            }
        })
    }

    getTypeData() {
        api.create().getTypeAM().then((response) => {
a.bairuha's avatar
a.bairuha committed
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
            if (response.data) {
                if (response.ok) {
                    if (response.data.status == 'success') {
                        let data = response.data.data
                        let typeData = data.map((item) => {
                            return {
                                approval_type_id: item.approval_type_id,
                                approval_type_name: item.approval_type_name
                            }
                        })
                        let index = typeData.findIndex((val) => val.approval_type_id == this.state.getTypeId)
                        let typeProps = {
                            options: typeData,
                            getOptionLabel: (option) => option.approval_type_name,
                        };
                        this.setState({ types: typeProps, typeData: response.data.data, getTypes: index == -1 ? typeData[0]: typeData[index] })
                    } else {
                        // alert('Approval Type: ' +response.data.message)
d.arizona's avatar
d.arizona committed
194
                        if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
a.bairuha's avatar
a.bairuha committed
195 196 197 198 199 200 201 202 203
                            this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
                                setTimeout(() => {
                                    localStorage.removeItem(Constant.TOKEN)
                                    window.location.reload();
                                }, 1000);
                            })
                        } else {
                            this.setState({ alert: true, messageAlert: 'Approval Type: ' +response.data.message, tipeAlert: 'error' })
                        }
204
                    }
a.bairuha's avatar
a.bairuha committed
205 206 207
                } else {
                    this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
                }
208
            } else {
a.bairuha's avatar
a.bairuha committed
209
                this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
210 211 212 213 214
            }
        })
    }


215 216
    handleChange(e, type) {
        let data = this.state
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
217
        let isDate = type !== '' ? true : false
218
        if (isDate && type == 'start_date') {
219 220
            this.setState({ startDate: format(e, 'yyyy-MM-dd'), endDate: null }, () => {
                this.clearError()
221
                // console.log(this.state.startDate)
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
222
            })
223
        } else if (isDate && type == 'end_date') {
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
224
            this.setState({ endDate: format(e, 'yyyy-MM-dd') }, () => {
225
                this.clearError()
226
                // console.log(this.state.endDate)
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
227
            })
228
        } else {
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
229
            // this.setState({...data, tempData: {...this.state.tempData, [e.target.name] :  e.target.value}})
230
        }
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
231

232 233
    }

234 235
    clearError() {
        this.setState({
236 237 238 239 240 241
            errorType: false,
            msgErrType: '',
            errorApproved: false,
            msgErrApproved: '',
            errorOperator: false,
            msgErrOperator: '',
242 243 244 245 246 247 248 249 250
            errorOrder: false,
            msgErrOrder: "",
            errorStartDate: false,
            errorEndDate: false,
            msgErrorStartDate: "",
            msgErrorEndDate: ""
        })
    }

251
    validasi() {
252
        if (R.isNil(this.state.getTypes)) {
253
            this.setState({ errorType: true, msgErrType: 'Approval Type Cannot be Empty' })
254 255
        }
        else if (R.isEmpty(this.state.order)) {
256
            this.setState({ errorOrder: true, msgErrOrder: 'Order Cannot be Empty'})
257
        }
258
        else if (R.isNil(this.state.getApprovedBy)) {
259
            this.setState({ errorApproved: true, msgErrApproved: 'Approver Name Cannot be Empty' })
260 261
        } 
        else if (R.isNil(this.state.getOperators)) {
262
            this.setState({ errorOperator: true, msgErrOperator: 'Operator Cannot be Empty' })
263
        } 
264
        else if (R.isEmpty(this.state.startDate)) {
265
            this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty' })
266
        } else if (R.isEmpty(this.state.endDate)) {
267
            this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' })
268 269 270 271 272 273 274 275 276 277 278 279
        } else {
            if (this.props.type == 'edit') {
            let payload = {
                    "approval_matrix_id": this.state.id,
                    "approval_type_id": this.state.getTypes.approval_type_id,
                    "orders": this.state.order,
                    "user_id": this.state.getApprovedBy.user_id,
                    "operator_type_id": this.state.getOperators.operator_type_id,
                    "start_date": this.state.startDate,
                    "end_date": this.state.endDate
                }
                this.props.updateAM(payload)
280
            }
281
        }
282 283
    }

Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
284
    render() {
285 286 287
        return (
            <div className="test app-popup-show" style={{ paddingTop: 100 }}>
                <div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
288
                    <div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
289 290 291 292 293 294 295 296 297 298 299
                        <div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
                            <div className="popup-title">
                                <span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Edit Data</span>
                            </div>
                        </div>
                        <div className="col-2 content-right" style={{ maxWidth: "inherit", alignSelf: 'center' }}>
                            <button
                                type="button"
                                className="btn btn-circle btn-white"
                                onClick={() => this.props.onClickClose()}
                            >
d.arizona's avatar
d.arizona committed
300
                                <img src={Images.close}/>
301 302 303 304 305 306 307
                            </button>
                        </div>
                    </div>

                    <div className="border-bottom" style={{ padding: 20 }}>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
308
                                <div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
309
                                    <TextField
310
                                        style={{ width: '100%' }}
311 312
                                        id="id"
                                        label="ID"
313
                                        value={this.state.id}
314 315 316 317 318 319 320 321 322 323 324 325 326
                                        disabled
                                        inputProps={{
                                            style: {
                                                fontSize: 11
                                            }
                                        }}
                                        InputLabelProps={{
                                            style: {
                                                fontSize: 11,
                                                color: '#7e8085'
                                            }
                                        }}
                                    />
327 328 329
                                </div>
                            </div>
                            <div className="column-2">
330 331 332 333
                                <div className="" style={{ padding: 10, borderRadius: 5 }}>
                                    <Autocomplete
                                        {...this.state.types}
                                        option
334
                                        debug
335
                                        id="tipe"
336
                                        onChange={(event, newInputValue) => this.setState({getTypes:newInputValue}, ()=> this.clearError())}
337 338
                                        renderInput={(params) => 
                                            <TextField {...params} 
339
                                                label="Approval Type" 
340 341 342
                                                onChange={(e) => this.handleChange(e, '')}
                                                error={this.state.errorType}
                                                helperText={this.state.msgErrType}
343 344 345 346 347 348 349 350
                                                InputLabelProps={{
                                                    style: {
                                                        fontSize: 11,
                                                        color: '#7e8085'
                                                    }
                                                }}
                                                InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
                                        />}
351 352
                                        value={this.state.getTypes}
                                    />
353 354 355 356 357
                                </div>
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
358
                                <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
359 360 361 362
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="order"
                                        label="Order"
363
                                        value={this.state.order === null ? '' : this.state.order}
364 365
                                        error={this.state.errorOrder}
                                        helperText={this.state.msgErrOrder}
366 367 368 369 370 371 372 373 374
                                        // onChange={(e) => this.setState({ order: e.target.value }, () => this.clearError())}
                                        onChange={(e) => {
                                            let coba = String(e.target.value).replace(/[^\d]/g,'');
                                            this.setState({
                                                order: coba
                                            }, 
                                            () => this.clearError())}
                                            // this.handleChange(coba, 'value')}
                                        }
375 376 377 378 379 380 381 382 383 384 385
                                        inputProps={{
                                            style: {
                                                fontSize: 11
                                            }
                                        }}
                                        InputLabelProps={{
                                            style: {
                                                fontSize: 11,
                                                color: '#7e8085'
                                            }
                                        }}
386
                                        // name="order"
387 388 389 390 391
                                    >
                                    </TextField>
                                </div>
                            </div>
                            <div className="column-2">
392
                                <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
393 394 395
                                    <Autocomplete
                                        {...this.state.approvedBy}
                                        option
396
                                        debug
397
                                        id="approvedby"
398
                                        onChange={(event, newInputValue) => this.setState({getApprovedBy: newInputValue}, ()=> this.clearError())}
399 400
                                        renderInput={(params) => 
                                            <TextField {...params} 
401
                                                label="Approver Name"
402 403 404
                                                onChange={(e) => this.handleChange(e, '')}
                                                error={this.state.errorApproved}
                                                helperText={this.state.msgErrApproved}
405 406 407 408 409 410 411 412
                                                InputLabelProps={{
                                                    style: {
                                                        fontSize: 11,
                                                        color: '#7e8085'
                                                    }
                                                }}
                                                InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
                                            />}
413 414
                                        value={this.state.getApprovedBy}
                                    />
415 416 417 418 419
                                </div>
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
420 421 422 423
                                <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                    <Autocomplete
                                        {...this.state.operators}
                                        option
424
                                        debug
425
                                        id="operator"
426
                                        onChange={(event, newInputValue) => this.setState({getOperators: newInputValue}, ()=> this.clearError())}
427 428 429
                                        renderInput={(params) => 
                                            <TextField {...params} 
                                                label="Operator" 
430 431 432
                                                onChange={(e) => this.handleChange(e, '')}
                                                error={this.state.errorOperator}
                                                helperText={this.state.msgErrOperator}
433 434 435 436 437 438 439 440
                                                InputLabelProps={{
                                                    style: {
                                                        fontSize: 11,
                                                        color: '#7e8085'
                                                    }
                                                }}
                                                InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
                                            />}
441 442
                                        value={this.state.getOperators}
                                    />
443 444 445 446 447 448 449 450
                                </div>
                            </div>
                            <div className="column-2">
                                
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
451 452 453 454
                                <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                    <DatePicker
                                        margin="normal"
                                        id="startDate"
455
                                        label="Valid From"
456 457 458 459 460 461
                                        format="dd MMMM yyyy"
                                        value={this.state.startDate}
                                        onChange={(e) => this.handleChange(e, 'start_date')}
                                        KeyboardButtonProps={{
                                            'aria-label': 'change date',
                                        }}
462 463 464 465 466
                                        inputProps={{
                                            style: {
                                                fontSize: 11
                                            }
                                        }}
467 468 469 470 471 472
                                        InputLabelProps={{
                                            style: {
                                                fontSize: 11,
                                                color: '#7e8085'
                                            }
                                        }}
473 474
                                        error={this.state.errorStartDate}
                                        helperText={this.state.msgErrorStartDate}
475
                                        style={{padding: 0, margin: 0, width: '100%'}}
476
                                    />
477 478 479
                                </div>
                            </div>
                            <div className="column-2">
480 481 482 483
                                <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                    <DatePicker
                                        margin="normal"
                                        id="endDate"
484
                                        label="Valid To"
485
                                        format="dd MMMM yyyy"
486 487 488
                                        error={this.state.errorEndDate}
                                        helperText={this.state.msgErrorEndDate}
                                        minDate={this.state.startDate}
489 490 491 492 493
                                        value={this.state.endDate}
                                        onChange={(e) => this.handleChange(e, 'end_date')}
                                        KeyboardButtonProps={{
                                            'aria-label': 'change date',
                                        }}
494 495 496 497 498
                                        inputProps={{
                                            style: {
                                                fontSize: 11
                                            }
                                        }}
499 500 501 502 503 504
                                        InputLabelProps={{
                                            style: {
                                                fontSize: 11,
                                                color: '#7e8085'
                                            }
                                        }}
505 506
                                        style={{padding: 0, margin: 0, width: '100%'}}
                                        />
507 508 509 510 511
                                </div>
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
512
                                <div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
513 514
                                    <TextField
                                        style={{ width: '100%' }}
515
                                        value={this.state.status}
516
                                        id="status"
517 518 519 520 521 522 523 524 525 526 527 528 529
                                        label="Status"
                                        disabled
                                        inputProps={{
                                            style: {
                                                fontSize: 11
                                            }
                                        }}
                                        InputLabelProps={{
                                            style: {
                                                fontSize: 11,
                                                color: '#7e8085'
                                            }
                                        }}
530 531 532 533 534
                                    >
                                    </TextField>
                                </div>
                            </div>
                            <div className="column-2">
535
                                {/* <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
536 537 538 539 540
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="max-value"
                                        label="Max Value"
                                        value="10"
541 542 543 544 545 546 547 548 549 550 551 552
                                        onChange={(e) => this.handleChange(e, '')}
                                        inputProps={{
                                            style: {
                                                fontSize: 11
                                            }
                                        }}
                                        InputLabelProps={{
                                            style: {
                                                fontSize: 11,
                                                color: '#7e8085'
                                            }
                                        }}
553 554
                                    >
                                    </TextField>
555
                                </div> */}
556 557
                            </div>
                        </div>
a.bairuha's avatar
a.bairuha committed
558
                        <div className="margin-top-10px" style={{ paddingTop: 10, paddingBottom: 10, paddingLeft: 10, paddingRight: 20 }}>
559
                            <div style={{ display: 'flex' }}>
a.bairuha's avatar
a.bairuha committed
560
                                <Typography style={{ fontSize: 11, width: '12%' }}>Created By</Typography>
561
                                <Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography>
562 563
                            </div>
                            <div style={{ display: 'flex' }}>
a.bairuha's avatar
a.bairuha committed
564
                                <Typography style={{ fontSize: 11, width: '12%' }}>Updated By</Typography>
565
                                <Typography style={{ fontSize: 11 }}>: {this.state.updated == - null ? "" : this.state.updated}</Typography>
566
                            </div>
567 568 569 570 571
                        </div>
                    </div>
                    <div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
                        <div className="column-1" style={{ alignSelf: 'center' }}>
                            <div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
572
                                <span style={{ color: '#354960', fontSize: 11 }} >Cancel</span>
573 574 575
                            </div>
                        </div>
                        <div className="column-2" style={{display: 'flex', justifyContent: 'flex-end', alignItems: 'center'}}>
576
                            <div onClick={() => this.validasi()} style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
577
                                <span style={{ color: '#fff', fontSize: 11 }}>Save</span>
578 579 580 581 582 583 584 585
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        );
    }
}