mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
Fix formatting issues and add
OnCallDutyPolicyEscalationRuleOnCallSchedule API endpoint
This commit is contained in:
parent
cbd7211690
commit
db92624920
@ -405,7 +405,6 @@ enum Permission {
|
||||
CanDeleteProjectOnCallDutyPolicyEscalationRuleOnCallSchedule = 'CanDeleteProjectOnCallDutyPolicyEscalationRuleOnCallSchedule',
|
||||
CanReadProjectOnCallDutyPolicyEscalationRuleOnCallSchedule = 'CanReadProjectOnCallDutyPolicyEscalationRuleOnCallSchedule',
|
||||
|
||||
|
||||
CanCreateProjectOnCallDutyPolicyEscalationRuleTeam = 'CanCreateProjectOnCallDutyPolicyEscalationRuleTeam',
|
||||
CanEditProjectOnCallDutyPolicyEscalationRuleTeam = 'CanEditProjectOnCallDutyPolicyEscalationRuleTeam',
|
||||
CanDeleteProjectOnCallDutyPolicyEscalationRuleTeam = 'CanDeleteProjectOnCallDutyPolicyEscalationRuleTeam',
|
||||
@ -1692,7 +1691,6 @@ export class PermissionHelper {
|
||||
isAccessControlPermission: true,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
permission:
|
||||
Permission.CanCreateProjectOnCallDutyPolicyEscalationRuleOnCallSchedule,
|
||||
@ -1730,7 +1728,6 @@ export class PermissionHelper {
|
||||
isAccessControlPermission: true,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
permission:
|
||||
Permission.CanCreateProjectOnCallDutyPolicyEscalationRuleUser,
|
||||
|
@ -119,14 +119,16 @@ const LayersPreview: FunctionComponent<ComponentProps> = (
|
||||
|
||||
return (
|
||||
<div id={props.id}>
|
||||
{props.showFieldLabel && <FieldLabelElement
|
||||
required={true}
|
||||
title="Layer Preview"
|
||||
description={
|
||||
'Here is a preview of who is on call and when. This is based on your local timezone - ' +
|
||||
OneUptimeDate.getCurrentTimezoneString()
|
||||
}
|
||||
/>}
|
||||
{props.showFieldLabel && (
|
||||
<FieldLabelElement
|
||||
required={true}
|
||||
title="Layer Preview"
|
||||
description={
|
||||
'Here is a preview of who is on call and when. This is based on your local timezone - ' +
|
||||
OneUptimeDate.getCurrentTimezoneString()
|
||||
}
|
||||
/>
|
||||
)}
|
||||
<Calendar
|
||||
events={calendarEvents}
|
||||
onRangeChange={(startEndTime: StartAndEndTime) => {
|
||||
|
@ -379,6 +379,11 @@ import OnCallDutyPolicyEscalationRuleTeamService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleTeamServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleTeamService';
|
||||
|
||||
import OnCallDutyPolicyEscalationRuleOnCallSchedule from 'Model/Models/OnCallDutyPolicyEscalationRuleOnCallSchedule';
|
||||
import OnCallDutyPolicyEscalationRuleOnCallScheduleService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleOnCallScheduleServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleOnCallScheduleService';
|
||||
|
||||
import OnCallDutyPolicyEscalationRuleUser from 'Model/Models/OnCallDutyPolicyEscalationRuleUser';
|
||||
import OnCallDutyPolicyEscalationRuleUserService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleUserServiceType,
|
||||
@ -1045,6 +1050,17 @@ app.use(
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAPI<
|
||||
OnCallDutyPolicyEscalationRuleOnCallSchedule,
|
||||
OnCallDutyPolicyEscalationRuleOnCallScheduleServiceType
|
||||
>(
|
||||
OnCallDutyPolicyEscalationRuleOnCallSchedule,
|
||||
OnCallDutyPolicyEscalationRuleOnCallScheduleService
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAPI<
|
||||
|
@ -216,7 +216,8 @@ export default class OnCallDutyPolicyEscalationRuleSchedule extends BaseModel {
|
||||
type: TableColumnType.Entity,
|
||||
modelType: OnCallDutyPolicySchedule,
|
||||
title: 'On Call Policy Schedule',
|
||||
description: 'Relation to On Call Policy Schedule who is in this escalation rule.',
|
||||
description:
|
||||
'Relation to On Call Policy Schedule who is in this escalation rule.',
|
||||
})
|
||||
@ManyToOne(
|
||||
(_type: string) => {
|
||||
@ -250,7 +251,8 @@ export default class OnCallDutyPolicyEscalationRuleSchedule extends BaseModel {
|
||||
@TableColumn({
|
||||
type: TableColumnType.ObjectID,
|
||||
title: 'On Call Duty Policy Schedule ID',
|
||||
description: 'ID of the on call schedule which is in this escalation rule.',
|
||||
description:
|
||||
'ID of the on call schedule which is in this escalation rule.',
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ObjectID,
|
||||
|
Loading…
Reference in New Issue
Block a user