Skip to content

Commit

Permalink
fix: delete theme
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG committed Jan 31, 2024
1 parent 7af04be commit 82cbce0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/app/theme/theme-detail/theme-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export class ThemeDetailComponent implements OnInit {
theme: Theme | undefined
usedInWorkspace: Workspace[] | undefined
themeName!: string
themeId!: string
themeDeleteVisible = false
themeDeleteMessage = ''
themePortalList = ''
Expand Down Expand Up @@ -174,7 +173,7 @@ export class ThemeDetailComponent implements OnInit {
}

private deleteTheme(): void {
this.themeApi.deleteTheme({ id: this.themeId }).subscribe({
this.themeApi.deleteTheme({ id: this.theme?.id! }).subscribe({
next: () => {
this.router.navigate(['..'], { relativeTo: this.route })
this.msgService.success({ summaryKey: 'ACTIONS.DELETE.THEME_OK' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,59 @@
pInputText
type="text"
readonly
id="portal_detail_item_creationDate"
id="theme_detail_item_creationDate"
class="w-full pt-3 pb-2"
[value]="theme?.creationDate | date : dateFormat"
[pTooltip]="'DETAIL.TOOLTIPS.CREATION_DATE' | translate"
tooltipPosition="top"
tooltipEvent="focus"
/>
<label for="portal_detail_item_creationDate">{{ 'DETAIL.CREATION_DATE' | translate }}</label>
<label for="theme_detail_item_creationDate">{{ 'DETAIL.CREATION_DATE' | translate }}</label>
</span>

<span class="p-float-label mb-1">
<input
pInputText
type="text"
readonly
id="portal_detail_item_creationUser"
id="theme_detail_item_creationUser"
class="w-full pt-3 pb-2"
[value]="theme?.creationUser"
[pTooltip]="'DETAIL.TOOLTIPS.CREATION_USER' | translate"
tooltipPosition="top"
tooltipEvent="focus"
/>
<label for="portal_detail_item_creationUser">{{ 'DETAIL.CREATION_USER' | translate }}</label>
<label for="theme_detail_item_creationUser">{{ 'DETAIL.CREATION_USER' | translate }}</label>
</span>

<span class="p-float-label mb-1">
<input
pInputText
type="text"
readonly
id="portal_detail_item_modificationDate"
id="theme_detail_item_modificationDate"
class="w-full pt-3 pb-2"
[value]="theme?.modificationDate | date : dateFormat"
[pTooltip]="'DETAIL.TOOLTIPS.MODIFICATION_DATE' | translate"
tooltipPosition="top"
tooltipEvent="focus"
/>
<label for="portal_detail_item_modificationDate">{{ 'DETAIL.MODIFICATION_DATE' | translate }}</label>
<label for="theme_detail_item_modificationDate">{{ 'DETAIL.MODIFICATION_DATE' | translate }}</label>
</span>

<span class="p-float-label mb-1">
<input
pInputText
type="text"
readonly
id="portal_detail_item_modificationUser"
id="theme_detail_item_modificationUser"
class="w-full pt-3 pb-2"
[value]="theme?.modificationUser"
[pTooltip]="'DETAIL.TOOLTIPS.MODIFICATION_USER' | translate"
tooltipPosition="top"
tooltipEvent="focus"
/>
<label for="portal_detail_item_modificationUser">{{ 'DETAIL.MODIFICATION_USER' | translate }}</label>
<label for="theme_detail_item_modificationUser">{{ 'DETAIL.MODIFICATION_USER' | translate }}</label>
</span>
</div>
</div>
Expand Down

0 comments on commit 82cbce0

Please sign in to comment.