ref: Refactoring
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import { StaticUserIds } from '../constants/StaticUsers';
|
||||
import { ListTypes, UserRoles } from '../constants/Enums';
|
||||
|
||||
export const isUserStatic = (user) => [StaticUserIds.DELETED].includes(user.id);
|
||||
|
||||
export const isUserAdminOrProjectOwner = (user) =>
|
||||
[UserRoles.ADMIN, UserRoles.PROJECT_OWNER].includes(user.role);
|
||||
|
||||
@@ -12,3 +15,5 @@ export const isListArchiveOrTrash = (list) =>
|
||||
[ListTypes.ARCHIVE, ListTypes.TRASH].includes(list.type);
|
||||
|
||||
export const isListFinite = (list) => [ListTypes.ACTIVE, ListTypes.CLOSED].includes(list.type);
|
||||
|
||||
export const isListKanban = (list) => [ListTypes.ACTIVE, ListTypes.CLOSED].includes(list.type);
|
||||
|
||||
Reference in New Issue
Block a user