Browse Source

FIX | fixed group permisions edit modal layout

merge-requests/55/head
Yevhen Romanenko 3 years ago
parent
commit
5379fd3061
  1. 1
      src/containers/Factory/index.tsx
  2. 5
      src/containers/GroupPermissions/atoms/access-rights-form-item/index.tsx
  3. 9
      src/containers/GroupPermissions/components/create-group-permissions/index.tsx
  4. 56
      src/containers/GroupPermissions/components/create-group-permissions/style.scss
  5. 7
      src/shared/components/fields/styles.scss

1
src/containers/Factory/index.tsx

@ -81,7 +81,6 @@ export const Factory: FC = () => { @@ -81,7 +81,6 @@ export const Factory: FC = () => {
<Button
color="primary"
size="sm"
style={{ paddingTop: 15, paddingBottom: 15 }}
onClick={() => {
setOpenModal(true);
setFactory(null);

5
src/containers/GroupPermissions/atoms/access-rights-form-item/index.tsx

@ -44,15 +44,16 @@ export const AccessRightsFormItem: FC<AccessRightsFormProps> = ({ values, isLoad @@ -44,15 +44,16 @@ export const AccessRightsFormItem: FC<AccessRightsFormProps> = ({ values, isLoad
onChange={val => onChange('factory', val)} />
</div>
</div>
<div className="multi-select">
<SelectMultiField
//@ts-ignore
style={{marginBottom: 20}}
defaultValue={values['permissions'] ? actionsOptions.filter(it => values?.permissions.includes(it?.value)).map(it => it.value) : null}
label="Дії"
options={actionsOptions}
onChange={val => onChange('permissions', val)}
/>
</div>
</>
)
}

9
src/containers/GroupPermissions/components/create-group-permissions/index.tsx

@ -140,10 +140,11 @@ export const CreateGroupPermissionsForm: FC<CreateGroupPermissionsFormProps> = ( @@ -140,10 +140,11 @@ export const CreateGroupPermissionsForm: FC<CreateGroupPermissionsFormProps> = (
</div>
{renderPermissions}
<Button style={{ width: 150, alignSelf: 'left' }} onClick={onSubmit} >
Зберегти
</Button>
<div className="btn-save">
<Button onClick={onSubmit} >
Зберегти
</Button>
</div>
</form>
);
};

56
src/containers/GroupPermissions/components/create-group-permissions/style.scss

@ -1,25 +1,45 @@ @@ -1,25 +1,45 @@
.add-group-field_container {
width: 100%;
display: flex;
justify-content: space-between;
flex-direction: row;
align-items: center;
padding-bottom: 15px;
margin-bottom: 30px;
border-bottom: 1px solid rgba(158, 39, 67, 0.1);
width: 100%;
display: flex;
justify-content: space-between;
flex-direction: row;
align-items: center;
padding-bottom: 20px;
margin-bottom: 15px;
border-bottom: 1px solid rgba(158, 39, 67, 0.1);
div {
width: 50%;
}
div {
width: 50%;
}
}
.select-factory_container {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
margin-top: 1px;
margin-bottom: 8px;
.select{
width: 230px;
}
.select {
width: 230px;
}
}
.multi-select {
margin-bottom: 15px;
}
}
.ant-btn-lg {
height: 46px;
border-radius: 10px;
}
.btn-save {
width: 150px;
align-self: "left";
margin-top: 15px;
// .ant-btn-lg {
// height: 46px;
// border-radius: 10px;
// }
}

7
src/shared/components/fields/styles.scss

@ -110,12 +110,15 @@ $border-radius: 10px; @@ -110,12 +110,15 @@ $border-radius: 10px;
border-radius: $border-radius !important;
& > div {
padding: 0 13px 0 13px;
// padding: 0 13px 0 13px;
}
span /* DOWN ARROW */ {
align-items: flex-end;
// align-items: flex-end;
color: rgba(122, 122, 122, 1);
.anticon {
vertical-align: middle;
}
}
}
}

Loading…
Cancel
Save