import { Action } from '@ngrx/store' ; import { Project } from '../../projects/models/project.model' ; import { Customer } from '../../customers/models/customer.model' ; export enum AdminActionTypes { GET_USERS_LIST = '[Admin] Get Users List' , USERS_LIST_FETCHED = '[Admin] Users list fetched' , GET_USER_PROJECTS = '[Admin] Get user projects' , USERS_PROJECTS_LOADED = '[Admin] User projects loaded' , DELETE_USER_PROJECT = '[Admin] Delete user project' , GET_USER_CUSTOMERS = '[Admin] Get user customers' , USERS_CUSTOMERS_LOADED = '[Admin] User customers loaded' , DELETE_USER_CUSTOMER = '[Admin] Delete user customer' , ADD_ADMIN_PRIVILEGES = '[Admin] Add admin privileges' , REMOVE_ADMIN_PRIVILEGES = '[Admin] Remove admin privileges' , ADMIN_ERROR = '[Admin] Error' } export class GetUsersList implements Action { readonly type = AdminActionTypes . GET_USERS_LIST ; } export class UsersListFetched implements Action { readonly type = AdminActionTypes . USERS_LIST_FETCHED ; constructor ( public payload ) { } } export class GetUserProjects implements Action { readonly type = AdminActionTypes . GET_USER_PROJECTS ; constructor ( public payload ) { } } export class DeleteUserProject implements Action { readonly type = AdminActionTypes . DELETE_USER_PROJECT ; constructor ( public payload ) { } } export class UserProjectsLoaded implements Action { readonly type = AdminActionTypes . USERS_PROJECTS_LOADED ; constructor ( public payload ) { } } export class GetUserCustomers implements Action { readonly type = AdminActionTypes . GET_USER_CUSTOMERS ; constructor ( public payload ) { } } export class DeleteUserCustomer implements Action { readonly type = AdminActionTypes . DELETE_USER_CUSTOMER ; constructor ( public payload ) { } } export class UserCustomersLoaded implements Action { readonly type = AdminActionTypes . USERS_CUSTOMERS_LOADED ; constructor ( public payload ) { } } export class AddAdminPrivileges implements Action { readonly type = AdminActionTypes . ADD_ADMIN_PRIVILEGES ; constructor ( public payload ) { } } export class RemoveAdminPrivileges implements Action { readonly type = AdminActionTypes . REMOVE_ADMIN_PRIVILEGES ; constructor ( public payload ) { } } export class AdminError implements Action { readonly type = AdminActionTypes . ADMIN_ERROR ; constructor ( public payload ) { } } export type AdminActions = GetUsersList | UsersListFetched | GetUserProjects | UserProjectsLoaded | DeleteUserProject | GetUserCustomers | UserCustomersLoaded | DeleteUserCustomer | AddAdminPrivileges | RemoveAdminPrivileges | AdminError ;