mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: add roles permission schema.
This commit is contained in:
@@ -25,7 +25,7 @@ export default function RolesFormContent() {
|
||||
const handleCloseClick = () => {
|
||||
history.go(-1);
|
||||
};
|
||||
|
||||
console.log(values, 'XX');
|
||||
return (
|
||||
<Form>
|
||||
{/* ---------- name ---------- */}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
export const mapperPermissionSchema = (data) => {
|
||||
return [data].map(({ permissions }) =>
|
||||
Object.keys(permissions).map((item) => {
|
||||
const [value, key] = item.split('/');
|
||||
return {
|
||||
subject: value,
|
||||
ability: key,
|
||||
value: permissions[item],
|
||||
};
|
||||
}),
|
||||
);
|
||||
export const mapperPermissionSchema = ({ permissions }) => {
|
||||
return Object.keys(permissions).map((index) => {
|
||||
const [value, key] = index.split('/');
|
||||
|
||||
return {
|
||||
subject: value,
|
||||
ability: key,
|
||||
value: permissions[index],
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1476,5 +1476,5 @@
|
||||
"roles.label.role_name":"Role name",
|
||||
"sidebar.transactions_locaking":"Transactions Locaking",
|
||||
"transactions_locking.dialog.label":"Transactions locking",
|
||||
"roles.permisssion_schema.success_message":"The given role hsa been created successfully"
|
||||
"roles.permisssion_schema.success_message":"The role has been created successfully."
|
||||
}
|
||||
Reference in New Issue
Block a user