Skip to content

Commit 477de2f

Browse files
committed
improved implementation
2 parents b75c272 + b3425ee commit 477de2f

4 files changed

Lines changed: 449 additions & 265 deletions

File tree

‎apps/codebility/app/home/(dashboard)/_components/DashboardProfile.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ export default function DashboardProfile() {
155155
</div>
156156
</Badge>
157157

158-
<SwitchStatusButton
158+
{/* <SwitchStatusButton
159159
isActive={active}
160160
disabled={activeloading}
161161
handleSwitch={handleStatusSwitch}
162162
/>
163163
164164
<p className="hidden max-w-[80px] text-center text-[10px] leading-tight text-gray-500 dark:text-gray-400 sm:block sm:text-xs">
165165
{active ? "Available for work" : "Away"}
166-
</p>
166+
</p> */}
167167
</div>
168168
)}
169169
</div>

‎apps/codebility/app/home/kanban/[projectId]/[id]/_components/tasks/TaskAddModal.tsx‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ const TaskAddModal = () => {
424424

425425
return (
426426
<Dialog open={isModalOpen} onOpenChange={handleClose}>
427-
<DialogContent className="phone:h-full phone:w-full tablet:h-full tablet:w-full laptop:h-[90vh] laptop:max-h-[800px] h-[95vh] max-h-[900px] w-[95vw] max-w-3xl overflow-y-auto bg-white p-4 dark:bg-gray-900">
427+
<DialogContent className="phone:h-full phone:w-full tablet:h-full tablet:w-full h-auto max-h-[900px] w-[95vw] max-w-3xl overflow-y-auto bg-white p-4 dark:bg-gray-900">
428428
<form
429429
onSubmit={(e) => {
430430
e.preventDefault();
@@ -452,7 +452,7 @@ const TaskAddModal = () => {
452452
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
453453
<div className="space-y-2">
454454
<Label htmlFor="title" className="text-sm font-medium">
455-
Task Title
455+
Task Title <span className="text-red-500">*</span>
456456
</Label>
457457
<Input
458458
id="title"
@@ -463,21 +463,6 @@ const TaskAddModal = () => {
463463
/>
464464
</div>
465465

466-
{/* NEW: Deadline Input */}
467-
<div className="space-y-2">
468-
<Label htmlFor="deadline" className="text-sm font-medium">
469-
Deadline
470-
</Label>
471-
<Input
472-
id="deadline"
473-
name="deadline"
474-
type="date"
475-
value={deadline}
476-
onChange={(e) => setDeadline(e.target.value)}
477-
className="bg-light-900 dark:bg-dark-200 dark:text-light-900 focus:border-customBlue-500 border border-gray-300"
478-
/>
479-
</div>
480-
481466
<div className="space-y-2">
482467
<div className="flex items-center gap-2">
483468
<Label htmlFor="points" className="text-sm font-medium">
@@ -498,7 +483,7 @@ const TaskAddModal = () => {
498483
</div>
499484

500485
<div className="space-y-2">
501-
<Label className="text-sm font-medium">Priority</Label>
486+
<Label className="text-sm font-medium">Priority <span className="text-red-500">*</span></Label>
502487
<Select name="priority">
503488
<SelectTrigger className="bg-light-900 focus:border-customBlue-500 border border-gray-300 dark:border-gray-700">
504489
<SelectValue placeholder="Select priority" />
@@ -521,7 +506,7 @@ const TaskAddModal = () => {
521506

522507
<div className="space-y-2">
523508
<div className="flex items-center gap-2">
524-
<Label className="text-sm font-medium">Difficulty</Label>
509+
<Label className="text-sm font-medium">Difficulty <span className="text-red-500">*</span></Label>
525510
<DifficultyPointsTooltip />
526511
</div>
527512
<Select
@@ -555,7 +540,7 @@ const TaskAddModal = () => {
555540
</div>
556541

557542
<div className="space-y-2">
558-
<Label className="text-sm font-medium">Task Type</Label>
543+
<Label className="text-sm font-medium">Task Type <span className="text-red-500">*</span></Label>
559544
<Select name="type">
560545
<SelectTrigger className="bg-light-900 focus:border-customBlue-500 border border-gray-300 dark:border-gray-700">
561546
<SelectValue placeholder="Select type" />
@@ -578,7 +563,7 @@ const TaskAddModal = () => {
578563
</div>
579564

580565
<div className="space-y-2">
581-
<Label className="text-sm font-medium">Skill Category</Label>
566+
<Label className="text-sm font-medium">Skill Category <span className="text-red-500">*</span></Label>
582567
<Select name="skill_category_id" required>
583568
<SelectTrigger className="bg-light-900 focus:border-customBlue-500 border border-gray-300 dark:border-gray-700">
584569
<SelectValue placeholder="Select skill category" />
@@ -594,6 +579,21 @@ const TaskAddModal = () => {
594579
</SelectContent>
595580
</Select>
596581
</div>
582+
583+
{/* NEW: Deadline Input */}
584+
<div className="">
585+
<Label htmlFor="deadline" className="text-sm font-medium">
586+
Deadline
587+
</Label>
588+
<Input
589+
id="deadline"
590+
name="deadline"
591+
type="date"
592+
value={deadline}
593+
onChange={(e) => setDeadline(e.target.value)}
594+
className="bg-light-900 dark:bg-dark-200 dark:text-light-900 focus:border-customBlue-500 border border-gray-300"
595+
/>
596+
</div>
597597
</div>
598598

599599
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
@@ -686,4 +686,4 @@ const TaskAddModal = () => {
686686
);
687687
};
688688

689-
export default TaskAddModal;
689+
export default TaskAddModal;

‎apps/codebility/app/home/kanban/[projectId]/[id]/_components/tasks/TaskEditModal.tsx‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ const TaskEditModal = () => {
469469
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
470470
<div className="space-y-2">
471471
<Label htmlFor="title" className="text-sm font-medium">
472-
Task Title
472+
Task Title <span className="text-red-500">*</span>
473473
</Label>
474474
<Input
475475
id="title"
@@ -482,20 +482,6 @@ const TaskEditModal = () => {
482482
/>
483483
</div>
484484

485-
<div className="space-y-2">
486-
<Label htmlFor="deadline" className="text-sm font-medium">
487-
Deadline <span className="text-gray-500 text-xs">(Optional)</span>
488-
</Label>
489-
<Input
490-
id="deadline"
491-
name="deadline"
492-
type="date"
493-
value={taskData.deadline || ""}
494-
onChange={(e) => handleInputChange("deadline", e.target.value)}
495-
className="focus:border-customBlue-500 border-gray-300 dark:border-gray-700"
496-
/>
497-
</div>
498-
499485
<div className="space-y-2">
500486
<div className="flex items-center gap-2">
501487
<Label htmlFor="points" className="text-sm font-medium">
@@ -516,7 +502,7 @@ const TaskEditModal = () => {
516502
</div>
517503

518504
<div className="space-y-2">
519-
<Label className="text-sm font-medium">Priority</Label>
505+
<Label className="text-sm font-medium">Priority <span className="text-red-500">*</span></Label>
520506
<Select
521507
value={taskData.priority}
522508
onValueChange={(value) => handleInputChange("priority", value)}
@@ -542,7 +528,7 @@ const TaskEditModal = () => {
542528

543529
<div className="space-y-2">
544530
<div className="flex items-center gap-2">
545-
<Label className="text-sm font-medium">Difficulty</Label>
531+
<Label className="text-sm font-medium">Difficulty <span className="text-red-500">*</span></Label>
546532
<DifficultyPointsTooltip />
547533
</div>
548534
<Select
@@ -577,7 +563,7 @@ const TaskEditModal = () => {
577563
</div>
578564

579565
<div className="space-y-2">
580-
<Label className="text-sm font-medium">Task Type</Label>
566+
<Label className="text-sm font-medium">Task Type <span className="text-red-500">*</span></Label>
581567
<Select
582568
value={taskData.type}
583569
onValueChange={(value) => handleInputChange("type", value)}
@@ -603,7 +589,7 @@ const TaskEditModal = () => {
603589

604590
<div className="space-y-2">
605591
<Label className="text-sm font-medium text-gray-900 dark:text-white">
606-
Skill Category
592+
Skill Category <span className="text-red-500">*</span>
607593
</Label>
608594
<Select
609595
value={taskData.skill_category_id}
@@ -626,6 +612,20 @@ const TaskEditModal = () => {
626612
</SelectContent>
627613
</Select>
628614
</div>
615+
616+
<div className="space-y-2">
617+
<Label htmlFor="deadline" className="text-sm font-medium">
618+
Deadline
619+
</Label>
620+
<Input
621+
id="deadline"
622+
name="deadline"
623+
type="date"
624+
value={taskData.deadline || ""}
625+
onChange={(e) => handleInputChange("deadline", e.target.value)}
626+
className="focus:border-customBlue-500 border-gray-300 dark:border-gray-700"
627+
/>
628+
</div>
629629
</div>
630630

631631
<div className="grid grid-cols-1 md:grid-cols-2">
@@ -714,4 +714,4 @@ const TaskEditModal = () => {
714714
);
715715
};
716716

717-
export default TaskEditModal;
717+
export default TaskEditModal;

0 commit comments

Comments
 (0)