update and create
MODIFY
src/server/rest/v1/service/UserService.ts
src/server/rest/v1/service/UserService.ts
@@ -969,8 +969,9 @@ export default class UserService {
// Save Admin Data
if (projectFields.includes('plateID') ||
projectFields.includes('technical') ||
- projectFields.includes('notificationsActive')) {
- const adminData: { plateID?: string; notificationsActive?: boolean; notifications?: UserNotifications, technical?: boolean } = {};
+ projectFields.includes('notificationsActive') ||
+ projectFields.includes('billable')) {
+ const adminData: { plateID?: string; notificationsActive?: boolean; notifications?: UserNotifications, technical?: boolean, billable?: boolean } = {};
if (Utils.objectHasProperty(user, 'plateID') &&
projectFields.includes('plateID')) {
adminData.plateID = user.plateID || null;
@@ -979,6 +980,10 @@ export default class UserService {
projectFields.includes('technical')) {
adminData.technical = user.technical;
}
+ if (Utils.objectHasProperty(user, 'billable') &&
+ projectFields.includes('billable')) {
+ adminData.billable = user.billable;
+ }
if (Utils.objectHasProperty(user, 'notificationsActive') &&
projectFields.includes('notificationsActive')) {
adminData.notificationsActive = user.notificationsActive;

MODIFY
src/types/User.ts
src/types/User.ts
@@ -41,7 +41,8 @@ export default interface User extends CreatedUpdatedProps, AuthorizationActions
importedData?: {
autoActivateUserAtImport: boolean;
};
- technical: boolean;
+ technical?: boolean;
+ billable?: boolean;
}
export interface UserSite {

update and create