Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ jobs:
run: |
aws s3 cp s3://jobshop.works/production.env ./src/.env

- name: Sync production.env configuration file
run: |
aws s3 cp s3://jobshop.works/production.env ./src/production.env

- name: Build, tag and push latest docker images
run: ENV=prod docker buildx bake --push

Expand Down
10 changes: 8 additions & 2 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### 1.0.1

- AutoChangelog HOTFIX [`#22`](https://github.com/eknowlton/simpletaskmanager/pull/22)
- Develop [`#21`](https://github.com/eknowlton/simpletaskmanager/pull/21)
- Auto Changelog & Feature Page [`#20`](https://github.com/eknowlton/simpletaskmanager/pull/20)
- Release [`#19`](https://github.com/eknowlton/simpletaskmanager/pull/19)
- Updates [`#18`](https://github.com/eknowlton/simpletaskmanager/pull/18)
- Release [`#17`](https://github.com/eknowlton/simpletaskmanager/pull/17)
- Version [`#16`](https://github.com/eknowlton/simpletaskmanager/pull/16)
- Develop [`#15`](https://github.com/eknowlton/simpletaskmanager/pull/15)
- Develop [`#13`](https://github.com/eknowlton/simpletaskmanager/pull/13)
- added laravel bug tracking [`#12`](https://github.com/eknowlton/simpletaskmanager/pull/12)
- Update tsconfig.json [`#11`](https://github.com/eknowlton/simpletaskmanager/pull/11)
- Adding more tests [`#8`](https://github.com/eknowlton/simpletaskmanager/pull/8)
- Create tasks from inbox #1 [`#11`](https://github.com/eknowlton/simpletaskmanager/pull/11)
- finished add and update task on inbox [`#10`](https://github.com/eknowlton/simpletaskmanager/pull/10)
- Fixes #24 [`#24`](https://github.com/eknowlton/simpletaskmanager/issues/24)
- initial commit [`998c687`](https://github.com/eknowlton/simpletaskmanager/commit/998c687056248b0c7bdb5d33576f616ae6c31cda)
- closer to working product [`c75cff3`](https://github.com/eknowlton/simpletaskmanager/commit/c75cff3e629365dae394a187a0c19d78a9979283)
- lets get the deploy build working [`1ffd542`](https://github.com/eknowlton/simpletaskmanager/commit/1ffd5424601b0b4baf47f0bdff0191b752ff0674)
48 changes: 48 additions & 0 deletions src/resources/js/components/ui/task-list-item.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Calendar, ChartNoAxesCombined, Sparkles, Check, Square, SquareCheck } from 'lucide-react';

export default function TaskListItem({ item: task, onClick }: { item: Shared.Data.Task, onClick: () => void }) {
return (
<div
key={task.id}
className="mb-2 flex flex-col justify-between rounded-md border hover:border-gray-300 dark:hover:border-gray-700 p-2 hover:bg-gray-100 dark:hover:bg-white/3"
>
<div className="flex flex-grow justify-between bg-gray-200 dark:bg-gray-900 px-3 py-2 rounded mb-2">
<button onClick={onClick} className="flex-grow text-left flex flex-row items-center gap-2">
{task.status.value != "completed" as Shared.TaskStatus ? <Square className={"w-4 h-4"} /> : <SquareCheck className={"w-4 h-4"} />} {task.title}
</button>
<div className="flex items-center gap-2">
<span className="flex items-center gap-2 text-sm text-gray-700 dark:text-gray-400">
<ChartNoAxesCombined className="h-4 w-4" /> {task.status.label}
</span>
<span className="flex items-center gap-2 text-sm text-gray-700 dark:text-gray-400">
<Sparkles className="h-4 w-4" /> {task.priority}
</span>
</div>
</div>
<div className="flex flex-grow">
<div className="flex-grow text-gray-700 dark:text-gray-400 p-2">{task.description}</div>
{task.due_date && (
<div className="flex items-center gap-2 text-sm text-gray-700 dark:text-gray-400">
<Calendar className="h-4 w-4" />
<span className="">{task.due_date ? new Date(task.due_date).toLocaleString() : null}</span>
</div>
)}
</div>
<div className="flex flex-grow pt-2 bg-gray-50py-2">
<div className="flex-grow"></div>
<div className="text-gray-700 dark:text-gray-400">
{task.tags &&
task.tags.length > 0 &&
task.tags.map(({ label, value }: Shared.Data.Tag) => (
<span
key={value}
className="ml-2 inline-block rounded bg-gray-200 px-2 py-1 text-xs text-gray-700 dark:bg-gray-600 dark:text-gray-200"
>
{label}
</span>
))}
</div>
</div>
</div>
);
}
9 changes: 9 additions & 0 deletions src/resources/js/components/ui/task-list.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React, { JSX } from 'react';

export default function TaskList({ children}: React.PropsWithChildren){
return (
<div className={`flex flex-col gap-2`}>
{children}
</div>
);
}
78 changes: 16 additions & 62 deletions src/resources/js/pages/inbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { type BreadcrumbItem } from '@/types';
import { Head } from '@inertiajs/react';
import { Plus } from 'lucide-react';
import { useState } from 'react';
import TaskList from '@/components/ui/task-list';
import TaskListItem from '@/components/ui/task-list-item';

const breadcrumbs: BreadcrumbItem[] = [
{
Expand Down Expand Up @@ -39,37 +41,14 @@ export default function Inbox({ inbox, twoMinute }: { inbox: Shared.Data.Task[];
<ContentBody>
{inbox.length > 0 ? (
<div className="p-4">
{inbox.map((task) => (
<div
key={task.id}
className="mb-2 flex flex-col justify-between rounded-md border p-2 hover:bg-gray-100 dark:hover:bg-white/3"
>
<div className="flex flex-grow">
<button
onClick={() => {
setTask(task);
setView('edit');
}}
className="flex-grow text-left"
>
{task.title}
</button>
<div>
{task.status.label}{' '}
<span className="text-sm text-gray-700 dark:text-gray-400">( {task.priority} )</span>
</div>
</div>
<div className="flex flex-grow">
<div className="flex-grow text-gray-700 dark:text-gray-400">{task.description}</div>
{task.due_date && (
<div>
<span className="bold text-sm text-gray-700 dark:text-gray-400">Due On</span>
<span className="pl-4">{task.due_date && new Date(task.due_date).toLocaleString()}</span>
</div>
)}
</div>
</div>
))}
<TaskList>
{inbox.map((task) => (
<TaskListItem item={task} onClick={() => {
setTask(task);
setView('edit');
}} />
))}
</TaskList>
</div>
) : (
<p className="p-4">No upcoming tasks.</p>
Expand All @@ -80,39 +59,14 @@ export default function Inbox({ inbox, twoMinute }: { inbox: Shared.Data.Task[];
<ContentHeader title="2-Minute Tasks" />
<ContentBody>
{twoMinute.length > 0 ? (
<div className="p-4">
<TaskList>
{twoMinute.map((task) => (
<div
key={task.id}
className="mb-2 flex flex-col justify-between rounded-md border p-2 hover:bg-gray-100 dark:hover:bg-white/3"
>
<div className="flex flex-grow">
<button
onClick={() => {
setTask(task);
setView('edit');
}}
className="flex-grow text-left"
>
{task.title}
</button>
<div>
{task.status.label}{' '}
<span className="text-sm text-gray-700 dark:text-gray-400">( {task.priority} )</span>
</div>
</div>
<div className="flex flex-grow">
<div className="flex-grow text-gray-700 dark:text-gray-400">{task.description}</div>
{task.due_date && (
<div>
<span className="bold text-sm text-gray-700 dark:text-gray-400">Due On</span>
<span className="pl-4">{task.due_date && new Date(task.due_date).toLocaleString()}</span>
</div>
)}
</div>
</div>
<TaskListItem item={task} onClick={() => {
setTask(task);
setView('edit');
}} />
))}
</div>
</TaskList>
) : (
<p className="p-4">No two minute tasks.</p>
)}
Expand Down
69 changes: 14 additions & 55 deletions src/resources/js/pages/projects/inbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import { ProjectView } from '@/components/project-view';
import { TaskView } from '@/components/task-view';
import { Button } from '@/components/ui/button';
import { Sheet, SheetContent } from '@/components/ui/sheet';
import TaskList from '@/components/ui/task-list';
import TaskListItem from '@/components/ui/task-list-item';
import AppLayout from '@/layouts/app-layout';
import { type BreadcrumbItem } from '@/types';
import { Head } from '@inertiajs/react';
import { ChartNoAxesCombined, Plus, Sparkles } from 'lucide-react';
import { Plus } from 'lucide-react';
import { useState } from 'react';

const breadcrumbs: BreadcrumbItem[] = [
Expand Down Expand Up @@ -42,60 +44,17 @@ export default function Show({ project, tasks }: { project: Shared.Data.Project;
<ContentHeader title={project.title} description={`Inbox`} />
<ContentBody>
{tasks.length > 0 ? (
<>
<div className="p-4">
{tasks.map((task) => (
<div
key={task.id}
className="mb-2 flex flex-col justify-between rounded-md border p-2 hover:bg-gray-100 dark:hover:bg-white/3"
>
<div className="flex flex-grow">
<button
className="flex-grow text-left text-lg"
onClick={() => {
setTask(task);
setView('edit-task');
}}
>
{task.title}
</button>
<div className="flex items-center gap-2">
<span className="flex items-center gap-2 text-sm text-gray-700 dark:text-gray-400">
<ChartNoAxesCombined className="h-4 w-4" /> {task.status.label}
</span>
<span className="flex items-center gap-2 text-sm text-gray-700 dark:text-gray-400">
<Sparkles className="h-4 w-4" /> {task.priority}
</span>
</div>
</div>
<div className="flex flex-grow">
<div className="flex-grow text-gray-700 dark:text-gray-400">{task.description}</div>
{task.due_date && (
<div>
<span className="bold text-sm text-gray-700 dark:text-gray-400">Due On</span>
<span className="pl-4">{task.due_date && new Date(task.due_date).toLocaleString()}</span>
</div>
)}
</div>
<div className="flex flex-grow pt-2">
<div className="flex-grow"></div>
<div className="text-gray-700 dark:text-gray-400">
{task.tags &&
task.tags.length > 0 &&
task.tags.map(({ label, value }) => (
<span
key={value}
className="ml-2 inline-block rounded bg-gray-200 px-2 py-1 text-xs text-gray-700 dark:bg-gray-600 dark:text-gray-200"
>
{label}
</span>
))}
</div>
</div>
</div>
))}
</div>
</>
<TaskList>
{tasks.map((task) => (
<TaskListItem
item={task}
onClick={() => {
setTask(task);
setView('edit');
}}
/>
))}
</TaskList>
) : (
<p className="p-6">No tasks in project.</p>
)}
Expand Down
Loading