This commit is contained in:
CITE\amentis 2024-09-24 16:54:08 +03:00
parent a563c50cab
commit 3bbe71d218
4 changed files with 5 additions and 2 deletions

View File

@ -181,7 +181,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="frame mb-3 pt-4 pl-4 pr-5 pb-3"> <div class="frame mb-3 pt-4 pl-4 pr-5 pb-3">
<ng-container *ngIf="availableStatusesTransitions && availableStatusesTransitions.length > 0 && !isLocked && hasDoi(plan) && plan.belongsToCurrentTenant != false"> <ng-container *ngIf="availableStatusesTransitions && availableStatusesTransitions.length > 0 && !isLocked && plan.versionStatus != planVersionStatusEnum.Previous && hasDoi(plan) && plan.belongsToCurrentTenant != false">
<div *ngFor='let status of availableStatusesTransitions'> <div *ngFor='let status of availableStatusesTransitions'>
<div class="row align-items-center" (click)="persistStatus(status)"> <div class="row align-items-center" (click)="persistStatus(status)">
<div class="col-auto pr-0"> <div class="col-auto pr-0">

View File

@ -83,6 +83,7 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit {
planAccessTypeEnum = PlanAccessType; planAccessTypeEnum = PlanAccessType;
planStatusEnum = PlanStatusEnum; planStatusEnum = PlanStatusEnum;
planUserRoleEnum = PlanUserRole; planUserRoleEnum = PlanUserRole;
planVersionStatusEnum = PlanVersionStatus;
authorFocus: string; authorFocus: string;
userName: string; userName: string;

View File

@ -52,7 +52,7 @@
<button [disabled]="saving" mat-menu-item (click)="formSubmit()" type="button">{{ 'PLAN-EDITOR.ACTIONS.SAVE-AND-CONTINUE' | translate }}</button> <button [disabled]="saving" mat-menu-item (click)="formSubmit()" type="button">{{ 'PLAN-EDITOR.ACTIONS.SAVE-AND-CONTINUE' | translate }}</button>
</mat-menu> </mat-menu>
</div> </div>
<div *ngIf="availableStatusesTransitions && availableStatusesTransitions.length > 0 && !isLocked && !isNew && hasNotDoi()" class="col-auto d-flex align-items-center" [matTooltipDisabled]="formGroup.pristine" matTooltip="{{'PLAN-EDITOR.ACTIONS.FINALIZE.CAN-NOT-FINALIZE' | translate}}"> <div *ngIf="availableStatusesTransitions && availableStatusesTransitions.length > 0 && item.versionStatus != planVersionStatusEnum.Previous &&!isLocked && !isNew && hasNotDoi()" class="col-auto d-flex align-items-center" [matTooltipDisabled]="formGroup.pristine" matTooltip="{{'PLAN-EDITOR.ACTIONS.FINALIZE.CAN-NOT-FINALIZE' | translate}}">
<button *ngFor='let status of availableStatusesTransitions' [disabled]="saving || !formGroup.pristine" mat-button class="rounded-btn primary-inverted mr-2" type="button" (click)="persistStatus(status)">{{ status.action?.length > 0 ? status.action : status.name }}</button> <button *ngFor='let status of availableStatusesTransitions' [disabled]="saving || !formGroup.pristine" mat-button class="rounded-btn primary-inverted mr-2" type="button" (click)="persistStatus(status)">{{ status.action?.length > 0 ? status.action : status.name }}</button>
</div> </div>
<div *ngIf="isLocked" class="col-auto d-flex align-items-center"> <div *ngIf="isLocked" class="col-auto d-flex align-items-center">

View File

@ -63,6 +63,7 @@ import { PlanAssociatedUser } from '@app/core/model/user/user';
import { PlanStatusService } from '@app/core/services/plan/plan-status.service'; import { PlanStatusService } from '@app/core/services/plan/plan-status.service';
import { PlanStatus } from '@app/core/model/plan-status/plan-status'; import { PlanStatus } from '@app/core/model/plan-status/plan-status';
import { PlanStatusAvailableActionType } from '@app/core/common/enum/plan-status-available-action-type'; import { PlanStatusAvailableActionType } from '@app/core/common/enum/plan-status-available-action-type';
import { PlanVersionStatus } from '@app/core/common/enum/plan-version-status';
@Component({ @Component({
selector: 'app-plan-editor', selector: 'app-plan-editor',
@ -89,6 +90,7 @@ export class PlanEditorComponent extends BaseEditor<PlanEditorModel, Plan> imple
planAccessTypeEnum = PlanAccessType; planAccessTypeEnum = PlanAccessType;
planAccessTypeEnumValues = this.enumUtils.getEnumValues<PlanAccessType>(PlanAccessType); planAccessTypeEnumValues = this.enumUtils.getEnumValues<PlanAccessType>(PlanAccessType);
planUserTypeEnum = PlanUserType; planUserTypeEnum = PlanUserType;
planVersionStatusEnum = PlanVersionStatus;
planUserTypeEnumValues = this.enumUtils.getEnumValues<PlanUserType>(PlanUserType); planUserTypeEnumValues = this.enumUtils.getEnumValues<PlanUserType>(PlanUserType);
planUserRoleEnumValues = this.enumUtils.getEnumValues<PlanUserRole>(PlanUserRole); planUserRoleEnumValues = this.enumUtils.getEnumValues<PlanUserRole>(PlanUserRole);
fileTransformerEntityTypeEnum = FileTransformerEntityType; fileTransformerEntityTypeEnum = FileTransformerEntityType;