mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Fix: fix jittering when toggling workflows
This commit is contained in:
parent
6007b252d7
commit
4c4d3a45c2
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@if (loading) {
|
||||
@if (loading && workflows.length === 0) {
|
||||
<li class="list-group-item">
|
||||
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
|
||||
<ng-container i18n>Loading...</ng-container>
|
||||
@ -36,7 +36,7 @@
|
||||
<div class="col d-flex align-items-center d-none d-sm-flex"><code>{{workflow.order}}</code></div>
|
||||
<div class="col d-flex align-items-center">
|
||||
<div class="form-check form-switch mb-0">
|
||||
<input #inputField type="checkbox" class="form-check-input cursor-pointer" [id]="workflow.id+'_enable'" [(ngModel)]="workflow.enabled" (change)="onWorkflowEnableToggled(workflow)" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Workflow }">
|
||||
<input #inputField type="checkbox" class="form-check-input cursor-pointer" [id]="workflow.id+'_enable'" [(ngModel)]="workflow.enabled" (change)="toggleWorkflowEnabled(workflow)" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Workflow }">
|
||||
<label class="form-check-label cursor-pointer" [for]="workflow.id+'_enable'">
|
||||
<code> @if(workflow.enabled) { <ng-container i18n>Enabled</ng-container> } @else { <span i18n class="text-muted">Disabled</span> }</code>
|
||||
</label>
|
||||
|
@ -147,7 +147,7 @@ export class WorkflowsComponent
|
||||
})
|
||||
}
|
||||
|
||||
onWorkflowEnableToggled(workflow: Workflow) {
|
||||
toggleWorkflowEnabled(workflow: Workflow) {
|
||||
this.workflowService.patch(workflow).subscribe({
|
||||
next: () => {
|
||||
this.toastService.showInfo(
|
||||
|
Loading…
x
Reference in New Issue
Block a user