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"
|
||||
mat-icon-button
|
||||
matTooltip="{{ 'Create final print template' | translate }}"
|
||||
*ngIf="motion.state.isFinalState"
|
||||
*ngIf="motion.state.isFinalState && !motion.modified_final_version"
|
||||
(click)="createModifiedFinalVersion()"
|
||||
>
|
||||
<mat-icon>file_copy</mat-icon>
|
||||
|
@ -1116,19 +1116,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
||||
// Update the motion
|
||||
try {
|
||||
// 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);
|
||||
}
|
||||
} catch (e) {
|
||||
this.raiseError(e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user