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

pull/9581/head
Henriette Darge 3 years ago
parent 9dea3824e0
commit ef425e9ec7
  1. 6
      frontend/src/app/core/state/hal-resource.ts
  2. 4
      frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts
  3. 6
      frontend/src/app/core/state/projects/project.model.ts
  4. 6
      frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.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;
}

@ -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?

@ -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;

@ -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;

Loading…
Cancel
Save