Browse Source

fix: update layout

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

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

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

Loading…
Cancel
Save