Merge pull request #5209 from tsiegleauq/hide-create-final-version-button
Hide print-template button
This commit is contained in:
commit
fbe5ea2056
@ -532,7 +532,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
matTooltip="{{ 'Create final print template' | translate }}"
|
matTooltip="{{ 'Create final print template' | translate }}"
|
||||||
*ngIf="motion.state.isFinalState"
|
*ngIf="motion.state.isFinalState && !motion.modified_final_version"
|
||||||
(click)="createModifiedFinalVersion()"
|
(click)="createModifiedFinalVersion()"
|
||||||
>
|
>
|
||||||
<mat-icon>file_copy</mat-icon>
|
<mat-icon>file_copy</mat-icon>
|
||||||
|
@ -1116,19 +1116,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
|||||||
// Update the motion
|
// Update the motion
|
||||||
try {
|
try {
|
||||||
// Just confirm this, if there is one modified final version the user would override.
|
// Just confirm this, if there is one modified final version the user would override.
|
||||||
if (this.motion.modified_final_version) {
|
|
||||||
const title = this.translate.instant(
|
|
||||||
'Are you sure you want to copy the final version to the print template?'
|
|
||||||
);
|
|
||||||
if (await this.promptService.open(title)) {
|
|
||||||
this.updateMotion({ modified_final_version: finalVersion }, this.motion).then(
|
|
||||||
() => this.setChangeRecoMode(ChangeRecoMode.ModifiedFinal),
|
|
||||||
this.raiseError
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
await this.updateMotion({ modified_final_version: finalVersion }, this.motion);
|
await this.updateMotion({ modified_final_version: finalVersion }, this.motion);
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.raiseError(e);
|
this.raiseError(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user