-
Notifications
You must be signed in to change notification settings - Fork 12
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
Showing
46 changed files
with
1,119 additions
and
358 deletions.
There are no files selected for viewing
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file not shown.
Binary file not shown.
File renamed without changes
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
<template> | ||
<AppLayout title="Create Team"> | ||
<template #header> | ||
<h2 class="font-semibold text-xl text-gray-800 leading-tight dark:text-gray-200"> | ||
Create Team | ||
</h2> | ||
</template> | ||
|
||
<CreateTeamForm /> | ||
</AppLayout> | ||
</template> | ||
|
||
<script setup> | ||
import AppLayout from '@/Layouts/AppLayout.vue' | ||
import CreateTeamForm from '@/Pages/Teams/Partials/CreateTeamForm.vue' | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<template> | ||
<FormSection @submitted="createTeam"> | ||
<template #title> | ||
Team Details | ||
</template> | ||
|
||
<template #description> | ||
Create a new team to collaborate with others on projects. | ||
</template> | ||
|
||
<template #form> | ||
<div class="col-span-6"> | ||
<Label value="Team Owner" /> | ||
|
||
<div class="flex items-center mt-2"> | ||
<img class="object-cover w-12 h-12 rounded-full" :src="$page.props.user.profile_photo_url" :alt="$page.props.user.name"> | ||
|
||
<div class="ml-4 leading-tight"> | ||
<div>{{ $page.props.user.name }}</div> | ||
<div class="text-sm text-gray-700">{{ $page.props.user.email }}</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-4"> | ||
<Label for="name" value="Team Name" /> | ||
<Input id="name" type="text" class="block w-full mt-1" v-model="form.name" autofocus /> | ||
<InputError :message="form.errors.name" class="mt-2" /> | ||
</div> | ||
</template> | ||
|
||
<template #actions> | ||
<Button :disabled="form.processing"> | ||
Create | ||
</Button> | ||
</template> | ||
</FormSection> | ||
</template> | ||
|
||
<script setup> | ||
import { useForm } from '@inertiajs/inertia-vue3' | ||
import Button from '@/Components/Button.vue' | ||
import FormSection from '@/Components/FormSection.vue' | ||
import Input from '@/Components/Input.vue' | ||
import InputError from '@/Components/InputError.vue' | ||
import Label from '@/Components/Label.vue' | ||
import { successToast } from '@/Toast' | ||
const form = useForm({ | ||
name: '', | ||
}) | ||
const createTeam = () => { | ||
form.post(route('teams.store'), { | ||
errorBag: 'createTeam', | ||
preserveScroll: true, | ||
onSuccess: () => { | ||
successToast({ | ||
text: 'Team created.' | ||
}) | ||
} | ||
}) | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<template> | ||
<ActionSection> | ||
<template #title> | ||
Delete Team | ||
</template> | ||
|
||
<template #description> | ||
Permanently delete this team. | ||
</template> | ||
|
||
<template #content> | ||
<div class="max-w-xl text-sm text-gray-600 dark:text-gray-400"> | ||
Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain. | ||
</div> | ||
|
||
<div class="mt-5"> | ||
<Button variant="danger" @click="confirmTeamDeletion"> | ||
Delete Team | ||
</Button> | ||
</div> | ||
|
||
<!-- Delete Team Confirmation Modal --> | ||
<ConfirmationModal :show="confirmingTeamDeletion" @close="confirmingTeamDeletion = false"> | ||
<template #title> | ||
Delete Team | ||
</template> | ||
|
||
<template #content> | ||
Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted. | ||
</template> | ||
|
||
<template #footer> | ||
<Button variant="info" @click="confirmingTeamDeletion = false"> | ||
Cancel | ||
</Button> | ||
|
||
<Button variant="danger" class="ml-2" @click="deleteTeam" :disabled="form.processing"> | ||
Delete Team | ||
</Button> | ||
</template> | ||
</ConfirmationModal> | ||
</template> | ||
</ActionSection> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from 'vue' | ||
import { useForm } from '@inertiajs/inertia-vue3' | ||
import ActionSection from '@/Components/ActionSection.vue' | ||
import ConfirmationModal from '@/Components/ConfirmationModal.vue' | ||
import Button from '@/Components/Button.vue' | ||
const props = defineProps({ | ||
team: Object, | ||
}) | ||
const confirmingTeamDeletion = ref(false) | ||
const form = useForm() | ||
const confirmTeamDeletion = () => { | ||
confirmingTeamDeletion.value = true | ||
} | ||
const deleteTeam = () => { | ||
form.delete(route('teams.destroy', props.team), { | ||
errorBag: 'deleteTeam', | ||
}) | ||
} | ||
</script> |
Oops, something went wrong.