Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Rename "CustomText" to "Formattable" to match the API naming

Henriette Dargeef425e9ec7ef
diff --git a/frontend/src/app/core/state/hal-resource.ts b/frontend/src/app/core/state/hal-resource.ts
index ad8187f8720..bc6e47f03d4 100644
--- a/frontend/src/app/core/state/hal-resource.ts
+++ b/frontend/src/app/core/state/hal-resource.ts
@@ -10,10 +10,10 @@ export interface HalResourceLink {
*/
export type HalResourceLinks = Record<string, HalResourceLink|HalResourceLink[]>;
-export type CustomTextFormat = 'markdown'|'custom';
+export type FormattableFormat = 'markdown'|'custom';
-export interface CustomText {
- format:CustomTextFormat;
+export interface Formattable {
+ format:FormattableFormat;
raw:string;
html:string;
}
diff --git a/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts b/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts
index 51ac5fdd7bc..ed68ee588aa 100644
--- a/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts
+++ b/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts
@@ -2,7 +2,7 @@ import { ID } from '@datorama/akita';
import {
HalResourceLink,
HalResourceLinks,
- CustomText,
+ Formattable,
} from 'core-app/core/state/hal-resource';
export const NOTIFICATIONS_MAX_SIZE = 100;
@@ -23,7 +23,7 @@ export interface InAppNotification {
readIAN:boolean|null;
readEmail:boolean|null;
- details?:CustomText[];
+ details?:Formattable[];
// Mark a notification to be kept in the center even though it was saved as "read".
keep?:boolean;
// Show message of a notification?
diff --git a/frontend/src/app/core/state/projects/project.model.ts b/frontend/src/app/core/state/projects/project.model.ts
index bcacb9d8537..baf62ea7009 100644
--- a/frontend/src/app/core/state/projects/project.model.ts
+++ b/frontend/src/app/core/state/projects/project.model.ts
@@ -2,7 +2,7 @@ import { ID } from '@datorama/akita';
import {
HalResourceLink,
HalResourceLinks,
- CustomText,
+ Formattable,
} from 'core-app/core/state/hal-resource';
export const PROJECTS_MAX_SIZE = 100;
@@ -22,8 +22,8 @@ export interface Project {
name:string;
public:boolean;
active:boolean;
- statusExplanation:CustomText;
- description:CustomText;
+ statusExplanation:Formattable;
+ description:Formattable;
createdAt:string;
updatedAt:string;
diff --git a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts
index 3b63efb7011..7935aa494b5 100644
--- a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts
+++ b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts
@@ -27,7 +27,7 @@ import { take } from 'rxjs/internal/operators/take';
import { StateService } from '@uirouter/angular';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
import { BackRouteOptions } from 'core-app/features/work-packages/components/back-routing/back-routing.service';
-import { CustomText } from 'core-app/core/state/hal-resource';
+import { Formattable } from 'core-app/core/state/hal-resource';
import { InAppNotification } from 'core-app/core/state/in-app-notifications/in-app-notification.model';
import { IanCenterService } from 'core-app/features/in-app-notifications/center/state/ian-center.service';
@@ -50,10 +50,10 @@ export class InAppNotificationEntryComponent implements OnInit {
loading$ = this.storeService.query.selectLoading();
// Formattable body, if any
- body:CustomText[];
+ body:Formattable[];
// custom rendered details, if any
- details:CustomText[];
+ details:Formattable[];
// Whether body and details are empty
unexpandable = false;