Skip to content

Commit

Permalink
bug: fix task drag and drop
Browse files Browse the repository at this point in the history
  • Loading branch information
develite98 committed Dec 5, 2023
1 parent f175632 commit 73bb7b1
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
<div class="task-create"
<div class="task-create mix-dialog --default-padding"
[formGroup]="taskForm">
<div class="text-l">Add New {{ parentTask ? 'Task' : 'Swimlane' }}</div>
<div class="mix-dialog__header">
Add New {{ parentTask ? 'Task' : 'Swimlane' }}
</div>

@if(parentTask) {
<div class="row mt-4 mb-1">
<div class="col-6">
<div class="mb-1 text-sub text-500">Task Type</div>
<task-type-select formControlName="type"></task-type-select>
</div>
<div class="mix-dialog__content">
@if(parentTask) {
<div class="row mb-1">
<div class="col-6">
<div class="mb-1 text-sub text-500">Task Type</div>
<task-type-select formControlName="type"></task-type-select>
</div>

<div class="col-6">
<div class="mb-1 text-sub text-500">Task Priority</div>
<task-priority-select formControlName="taskPriority"></task-priority-select>
<div class="col-6">
<div class="mb-1 text-sub text-500">Task Priority</div>
<task-priority-select formControlName="taskPriority"></task-priority-select>
</div>
</div>
</div>
}
}

<div class="mt-3 mb-1 text-sub text-500">Short Summary</div>
<mix-input formControlName="title"
placeHolder="Quick description about your task"></mix-input>
<div class="mb-1 text-sub text-500">Short Summary</div>
<mix-input formControlName="title"
placeHolder="Quick description about your task"></mix-input>

<div class="mt-3 mb-1 text-sub text-500">Reporter</div>
<mix-user-select formControlName="reporter"></mix-user-select>
<div class="mt-3 mb-1 text-sub text-500">Reporter</div>
<mix-user-select formControlName="reporter"></mix-user-select>

<div class="mt-3 mb-1 text-sub text-500">Description</div>
<mix-rich-text-editor formControlName="description"></mix-rich-text-editor>
<div class="mt-3 mb-1 text-sub text-500">Description</div>
<mix-rich-text-editor formControlName="description"></mix-rich-text-editor>
</div>

<div class="mt-4 d-flex justify-content-end align-items-center gap-2">
<div class="mix-dialog__footer">
<mix-button [loading]="loadingState() === 'Loading'"
(click)="createTask()">Create</mix-button>
<mix-button type="outline"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { DragDropModule } from '@angular/cdk/drag-drop';
import { CommonModule } from '@angular/common';
import { Component, Input, inject, signal } from '@angular/core';
import { MixTaskNew, TaskStatus, TaskStatusDisplay } from '@mixcore/lib/model';
Expand All @@ -8,7 +9,12 @@ import { TaskParentCardComponent } from '../task-parent-card/task-parent-card.co
@Component({
selector: 'mix-task-group-list',
standalone: true,
imports: [CommonModule, TaskDndListComponent, TaskParentCardComponent],
imports: [
CommonModule,
TaskDndListComponent,
TaskParentCardComponent,
DragDropModule,
],
templateUrl: './task-group-list.component.html',
styleUrls: ['./task-group-list.component.scss'],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class TaskParentCardComponent {
public addTask() {
this.dialog.open(TaskCreateComponent, {
width: 800,
windowClass: 'top-align-modal',
data: {
parentTask: this.task,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { DragDropModule } from '@angular/cdk/drag-drop';
import { CommonModule } from '@angular/common';
import {
ChangeDetectionStrategy,
Expand Down Expand Up @@ -50,6 +51,7 @@ import { TaskStore } from './store/task.store';
TaskHeaderComponent,
ProjectSelectComponent,
TrackByProp,
DragDropModule,
],
templateUrl: './task-manage.component.html',
styleUrls: ['./task-manage.component.scss'],
Expand All @@ -75,6 +77,9 @@ export class TaskManageComponent extends BaseComponent {
}

public addTask() {
this.dialog.open(TaskCreateComponent, { width: 800 });
this.dialog.open(TaskCreateComponent, {
width: 800,
windowClass: 'top-align-modal',
});
}
}

1 comment on commit 73bb7b1

@vercel
Copy link

@vercel vercel bot commented on 73bb7b1 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.