-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40d8a09
commit d2e2b73
Showing
27 changed files
with
602 additions
and
179 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
app/Http/Controllers/Api/Projects/CreateTaskController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Api\Projects; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Http\Requests\UpdateProjectRequest; | ||
use App\Models\Project; | ||
use Illuminate\Http\Request; | ||
|
||
class CreateTaskController extends Controller | ||
{ | ||
public function __invoke(UpdateProjectRequest $request, Project $project) | ||
{ | ||
return $project->tasks()->create($request->validated()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
<script setup> | ||
import { Link } from '@inertiajs/vue3'; | ||
import {CpuChipIcon} from "@heroicons/vue/24/outline"; | ||
</script> | ||
|
||
<template> | ||
<Link :href="'/'"> | ||
<svg | ||
class="w-16 h-16" | ||
viewBox="0 0 48 48" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path d="M11.395 44.428C4.557 40.198 0 32.632 0 24 0 10.745 10.745 0 24 0a23.891 23.891 0 0113.997 4.502c-.2 17.907-11.097 33.245-26.602 39.926z" fill="#6875F5" /> | ||
<path d="M14.134 45.885A23.914 23.914 0 0024 48c13.255 0 24-10.745 24-24 0-3.516-.756-6.856-2.115-9.866-4.659 15.143-16.608 27.092-31.75 31.751z" fill="#6875F5" /> | ||
</svg> | ||
<CpuChipIcon class="h-16 w-16 text-slate-500" /> | ||
</Link> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<div> | ||
<div class="mx-4">{{ name }}</div> | ||
<div v-if="tasks.length > 0" class="py-2 mx-2 flex-col gap-4"> | ||
<Task v-for="task in tasks" :task="task"></Task> | ||
</div> | ||
<div v-else> | ||
<div class="text-center italic py-4 ">No tasks</div> | ||
</div> | ||
|
||
<div class="mx-4"> | ||
<SporkButton xsmall secondary @click="() => $emit('open')">Add Task</SporkButton> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import SporkChecklist from "@/Components/Spork/SporkChecklist.vue"; | ||
import SporkButton from "@/Components/Spork/SporkButton.vue"; | ||
import { watch } from 'vue'; | ||
import Task from "@/Components/Task.vue"; | ||
const { tasks, name } = defineProps({ | ||
name: { | ||
type: String, | ||
default: null | ||
}, | ||
tasks: { | ||
type: Array, | ||
default: () => [] | ||
} | ||
}) | ||
watch(tasks, (newVal, oldValue) => { | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<script setup> | ||
import SporkLabel from "@/Components/Spork/SporkLabel.vue"; | ||
import SporkInput from "@/Components/Spork/SporkInput.vue"; | ||
import SporkButton from "@/Components/Spork/SporkButton.vue"; | ||
import DynamicIcon from "@/Components/DynamicIcon.vue"; | ||
defineProps({ | ||
label: { | ||
type: String, | ||
default: null | ||
}, | ||
required: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
modelValue: { | ||
type: Array, | ||
default: () => [] | ||
}, | ||
type: { | ||
type: String, | ||
default: "text" | ||
}, | ||
placeholder: { | ||
type: String, | ||
default: "" | ||
}, | ||
canAddMore: { | ||
type: Boolean, | ||
default: true | ||
} | ||
}); | ||
defineEmits(["update:modelValue"]); | ||
</script> | ||
|
||
<template> | ||
<div class="flex gap-2 flex-col"> | ||
<div v-if="label" class="block uppercase tracking-wide text-xs font-semibold dark:text-stone-300" > | ||
{{ label }} | ||
</div> | ||
<label v-for="(item, index) in modelValue" class="flex items-center gap-2"> | ||
<input | ||
type="checkbox" | ||
:checked="modelValue[index].checked" | ||
@change="(event) => { modelValue[index].checked = event.target.checked; $emit('update:modelValue', modelValue)}" | ||
@click="(event) => { modelValue[index].checked = event.target.checked; $emit('update:modelValue', modelValue)}" | ||
class="bg-stone-300 dark:bg-stone-700 rounded outline-none focus:outline-none" | ||
/> | ||
<SporkInput | ||
:model-value="modelValue[index].name" | ||
@change="(event) => { modelValue[index].name = event.target.value; $emit('update:modelValue', modelValue)}" | ||
:type="type" | ||
:placeholder="placeholder" | ||
/> | ||
<button @click="() => $emit('update:modelValue', modelValue.filter((item, i) => index !== i))"> | ||
<DynamicIcon icon-name="TrashIcon" class="w-5 h-5 text-red-500" /> | ||
</button> | ||
</label> | ||
<div v-if="canAddMore"> | ||
<SporkButton xsmall plain @click="() => $emit('update:modelValue', Array.isArray(modelValue) ? [...modelValue, { name: '', checked: false }] : [{ name: '', checked: false }])">Add</SporkButton> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.