Skip to content

Commit

Permalink
oops forgot to add force to web page source
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Jul 24, 2024
1 parent ce275fe commit 24aba21
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Sources/WebPageSourceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ protected function getValidationRules(): array
'title' => 'required|string',
'details' => 'required|string',
'active' => ['boolean', 'required'],
'force' => ['boolean', 'required'],
'recurring' => ['string', 'required'],
'meta_data.urls' => ['required', 'string'],
];
Expand All @@ -39,6 +40,7 @@ protected function makeSource(array $validated, Collection $collection): void
'title' => $validated['title'],
'details' => $validated['details'],
'recurring' => $validated['recurring'],
'force' => data_get($validated, 'force', false),
'active' => $validated['active'],
'collection_id' => $collection->id,
'type' => $this->sourceTypeEnum,
Expand Down
1 change: 1 addition & 0 deletions app/Http/Resources/SourceEditResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function toArray(Request $request): array
'collection_id' => $this->collection_id,
'details' => $this->details,
'active' => $this->active,
'force' => $this->force,
'recurring' => $this->recurring->value,
'description' => $this->description,
'slug' => $this->slug,
Expand Down
13 changes: 13 additions & 0 deletions resources/js/Pages/Sources/WebPageSource/Components/Resources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ https://docs.larallama.io/developing.html"
</div>


<div>
<InputLabel value="Force Repeat"/>
<input v-model="modelValue.force" type="checkbox" />
<InputError :message="modelValue.errors.force" />
<div class="text-xs prose m-2">
by default the system will only run the first time for a url or an email.
But if you want to to try again just check this box.
This can be good if you are checking a home page for updates.
Or a feed for updates. But NOT if you are checking an email box for emails and
do not want to repeat check the same email.
</div>
</div>

<div>
<InputLabel value="Recurring"/>
<select
Expand Down
1 change: 1 addition & 0 deletions resources/js/Pages/Sources/WebPageSource/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const props = defineProps({
const form = useForm({
title: '',
details: '',
force: false,
recurring: 'not',
meta_data: {
example: "[email protected]",
Expand Down
1 change: 1 addition & 0 deletions resources/js/Pages/Sources/WebPageSource/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const form = useForm({
title: props.source.data.title,
details: props.source.data.details,
active: props.source.data.active,
force: props.source.data.force,
recurring: props.source.data.recurring,
meta_data: {
urls: props.source.data.meta_data.urls
Expand Down

0 comments on commit 24aba21

Please sign in to comment.