Skip to content

Commit

Permalink
feat:Workaround for some required fields in EventDay and Staff
Browse files Browse the repository at this point in the history
  • Loading branch information
rubuy-74 committed Oct 6, 2024
1 parent 087731a commit 8e7ee98
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 20 deletions.
8 changes: 7 additions & 1 deletion database/seeders/ProductionSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Models\Admin;
use App\Models\Edition;
use App\Models\Departaments;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
Expand All @@ -15,10 +16,15 @@ class ProductionSeeder extends Seeder
*/
public function run(): void
{
Edition::create([
$edition = Edition::create([
'name' => 'SINF 2024',
'year' => 2024,
]);
/* DIDN'T TEST, THIS IS A REMINDER */
Departaments::create([
'name' => "-",
'edition_id' => $edition->id
]);
$user = User::create([
'name' => 'Admin',
'email' => '[email protected]',
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Components/Program/ProgramDayPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ onMounted(() => {
</button> -->
</div>
</section>
<p
<!-- <p
v-if="
(selectedType === 'talk' || selectedType === 'activity') && !noInfo
"
class="mr-2 mt-5 max-w-2xl border border-solid border-black p-2.5 px-8 text-justify text-lg font-bold text-2024-black shadow-md shadow-2024-black"
>
{{ day.theme }}
</p>
</p> -->
<template v-if="noInfo">
<p class="pt-40 text-4xl font-bold text-2024-light-blue">Em breve...</p>
</template>
Expand Down
6 changes: 3 additions & 3 deletions resources/js/Components/Team/SINFTeam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ defineProps<{
v-if="(department.staff?.length ?? 0) > 0"
class="flex flex-col items-center gap-4"
>
<p
<!-- <p
class="w-fit border border-black p-2 px-6 text-center text-xl font-bold shadow"
:class="textColor[color] || shadowColor[color]"
>
{{ department.name }}
</p>
<section class="flex flex-row flex-wrap justify-center gap-4">
</p> -->
<section class="flex flex-row flex-wrap justify-center gap-4 m-10">
<div
v-for="(staff, idx) in department.staff"
:key="idx"
Expand Down
8 changes: 4 additions & 4 deletions resources/js/Pages/CRUD/EventDay/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const currentEdition = computed(() => {
const form = useForm({
edition_id: currentEdition.value?.id.toString() ?? "",
theme: "",
date: "",
theme: "-",
date:"",
});
const submit = () => {
Expand All @@ -53,15 +53,15 @@ const submit = () => {
</option>
</TextInput>

<TextInput
<!-- <TextInput
id="theme"
v-model="form.theme"
label="Tema"
type="text"
required
autofocus
:error-message="form.errors.theme"
/>
/> -->

<TextInput
id="date"
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/CRUD/EventDay/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ const submit = () => {
</option>
</TextInput>

<TextInput
<!-- <TextInput
id="theme"
v-model="form.theme"
label="Tema"
type="text"
required
autofocus
:error-message="form.errors.theme"
/>
/> -->

<TextInput
id="date"
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/CRUD/EventDay/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const editions = computed<Record<number, string>>(() =>
<Header filter-by="edition_id" :filter-values="editions"
>Edição</Header
>
<Header sort-by="theme">Tema</Header>
<Header sort-by="theme">Tema (Ignorado na edição 2024)</Header>
<Header sort-by="date">Data</Header>
</HeaderRow>
</template>
Expand Down
6 changes: 3 additions & 3 deletions resources/js/Pages/CRUD/Staff/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface Props {
const props = defineProps<Props>();
const form = useForm({
department_id: "",
department_id: props.with.departments[0].id,
participant_id: "",
coordinator: false,
});
Expand All @@ -40,7 +40,7 @@ const submit = () => {
<template>
<CardLayout title="Adicionar Staff">
<form class="contents" @submit.prevent="submit">
<TextInput
<!-- <TextInput
v-model="form.department_id"
type="select"
required
Expand All @@ -55,7 +55,7 @@ const submit = () => {
{{ department.name }}
- {{ editions[department.edition_id] }}
</option>
</TextInput>
</TextInput> -->

<TextInput
v-model="form.participant_id"
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/CRUD/Staff/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const submit = () => {
<template>
<CardLayout title="Editar Staff">
<form class="contents" @submit.prevent="submit">
<TextInput
<!-- <TextInput
v-model="form.department_id"
type="select"
required
Expand All @@ -57,7 +57,7 @@ const submit = () => {
{{ department.name }}
- {{ editions[department.edition_id] }}
</option>
</TextInput>
</TextInput> -->

<TextInput
v-model="form.participant_id"
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/CRUD/Staff/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const participants = computed<Record<number, string>>(() =>
>Participante</Header
>
<Header filter-by="department_id" :filter-values="departments"
>Departamento</Header
>Departamento (Ignorado na edição 2024)</Header
>
<Header
filter-by="coordinator"
Expand Down
1 change: 0 additions & 1 deletion resources/js/Pages/Event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ const colorPicker = () => {
</a>
<template v-else>Inscreve-te!</template>
</PrimaryButton>

<PrimaryButton
v-else-if="isEnrolled && hasJoined"
color="teal-dark"
Expand Down

0 comments on commit 8e7ee98

Please sign in to comment.