Browse Source

fix: update layout

pull/1/head
Watiah11 6 months ago
parent
commit
2c5996a506
  1. 76
      src/views/SimproV2/ResourceWorker/DialogForm.js

76
src/views/SimproV2/ResourceWorker/DialogForm.js

@ -293,32 +293,26 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
</FormGroup> </FormGroup>
</Col> </Col>
</Row> </Row>
{ <Row>
statusCustomer === false && ( <Col md={6}>
<Row> <Label className="capitalize">{t('Customer')}</Label>
<Col md={6}> <Select style={{ width: "100%" }} defaultValue={statusCustomer} onChange={(e) => setStatusCustomer(e)}>
<FormGroup> <Option value={true}>Ya</Option>
<Label className="capitalize">{t('roles')} <span style={{ color: "red" }}>*</span></Label> <Option value={false}>Tidak</Option>
<Select showSearch defaultValue={roleId} onChange={(val) => setRoleId(val)} placeholder={t('selectRole')} style={{ width: '100%' }}> </Select>
{setupSelectRole()} </Col>
</Select> <Col md={6}>
</FormGroup> <Label className="capitalize">Status</Label>
</Col> <Select style={{ width: "100%" }} defaultValue={statusResource} onChange={(e) => setStatusResource(e)}>
<Col md={6}> <Option value={'active'}>Active</Option>
<FormGroup> <Option value={'inactive'}>Inactive</Option>
<Label className="capitalize">{t('division')} <span style={{ color: "red" }}>*</span></Label> </Select>
<Select showSearch defaultValue={divisionId} onChange={(val) => setDivisionId(val)} placeholder={t('selectDivision')} style={{ width: '100%' }}> </Col>
{setupSelectDivisi()} </Row>
</Select>
</FormGroup>
</Col>
</Row>
)
}
<Row> <Row>
{ {
role_name === 'Super Admin' && ( role_name === 'Super Admin' && (
<Col md={6}> <Col md={6} style={{ marginTop:'15px' }}>
<FormGroup> <FormGroup>
<Label className="capitalize">Assign Company Project<span style={{ color: "red" }}>*</span></Label> <Label className="capitalize">Assign Company Project<span style={{ color: "red" }}>*</span></Label>
<Select <Select
@ -341,20 +335,28 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
</Col> </Col>
) )
} }
<Col md={6}> {
<Label className="capitalize">{t('Customer')}</Label> statusCustomer === false && (
<Select style={{ width: "100%" }} defaultValue={statusCustomer} onChange={(e) => setStatusCustomer(e)}> <>
<Option value={true}>Ya</Option> <Col md={6} style={{ marginTop: statusCustomer === false ? '15px' : '0px' }}>
<Option value={false}>Tidak</Option> <FormGroup>
</Select> <Label className="capitalize">{t('roles')}</Label>
</Col> <Select showSearch defaultValue={roleId} onChange={(val) => setRoleId(val)} placeholder={t('selectRole')} style={{ width: '100%' }}>
<Col md={6}> {setupSelectRole()}
<Label className="capitalize">Status</Label> </Select>
<Select style={{ width: "100%" }} defaultValue={statusResource} onChange={(e) => setStatusResource(e)}> </FormGroup>
<Option value={'active'}>Active</Option> </Col>
<Option value={'inactive'}>Inactive</Option> <Col md={6} style={{ marginTop: statusCustomer === false ? '15px' : '0px' }}>
</Select> <FormGroup>
</Col> <Label className="capitalize">{t('division')} </Label>
<Select showSearch defaultValue={divisionId} onChange={(val) => setDivisionId(val)} placeholder={t('selectDivision')} style={{ width: '100%' }}>
{setupSelectDivisi()}
</Select>
</FormGroup>
</Col>
</>
)
}
<Col md={6} style={{ marginTop:'13px' }}> <Col md={6} style={{ marginTop:'13px' }}>
<Label className="capitalize">{t('restrictions')}</Label> <Label className="capitalize">{t('restrictions')}</Label>
<Select style={{ width: "100%" }} defaultValue={statusRestriction} onChange={(e) => setStatusRestriction(e)}> <Select style={{ width: "100%" }} defaultValue={statusRestriction} onChange={(e) => setStatusRestriction(e)}>

Loading…
Cancel
Save