Skip to content

Commit 24aba21

Browse files
committed
oops forgot to add force to web page source
1 parent ce275fe commit 24aba21

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

app/Http/Controllers/Sources/WebPageSourceController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ protected function getValidationRules(): array
2828
'title' => 'required|string',
2929
'details' => 'required|string',
3030
'active' => ['boolean', 'required'],
31+
'force' => ['boolean', 'required'],
3132
'recurring' => ['string', 'required'],
3233
'meta_data.urls' => ['required', 'string'],
3334
];
@@ -39,6 +40,7 @@ protected function makeSource(array $validated, Collection $collection): void
3940
'title' => $validated['title'],
4041
'details' => $validated['details'],
4142
'recurring' => $validated['recurring'],
43+
'force' => data_get($validated, 'force', false),
4244
'active' => $validated['active'],
4345
'collection_id' => $collection->id,
4446
'type' => $this->sourceTypeEnum,

app/Http/Resources/SourceEditResource.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function toArray(Request $request): array
2424
'collection_id' => $this->collection_id,
2525
'details' => $this->details,
2626
'active' => $this->active,
27+
'force' => $this->force,
2728
'recurring' => $this->recurring->value,
2829
'description' => $this->description,
2930
'slug' => $this->slug,

resources/js/Pages/Sources/WebPageSource/Components/Resources.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ https://docs.larallama.io/developing.html"
3434
</div>
3535

3636

37+
<div>
38+
<InputLabel value="Force Repeat"/>
39+
<input v-model="modelValue.force" type="checkbox" />
40+
<InputError :message="modelValue.errors.force" />
41+
<div class="text-xs prose m-2">
42+
by default the system will only run the first time for a url or an email.
43+
But if you want to to try again just check this box.
44+
This can be good if you are checking a home page for updates.
45+
Or a feed for updates. But NOT if you are checking an email box for emails and
46+
do not want to repeat check the same email.
47+
</div>
48+
</div>
49+
3750
<div>
3851
<InputLabel value="Recurring"/>
3952
<select

resources/js/Pages/Sources/WebPageSource/Create.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const props = defineProps({
3030
const form = useForm({
3131
title: '',
3232
details: '',
33+
force: false,
3334
recurring: 'not',
3435
meta_data: {
3536
example: "[email protected]",

resources/js/Pages/Sources/WebPageSource/Edit.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const form = useForm({
3232
title: props.source.data.title,
3333
details: props.source.data.details,
3434
active: props.source.data.active,
35+
force: props.source.data.force,
3536
recurring: props.source.data.recurring,
3637
meta_data: {
3738
urls: props.source.data.meta_data.urls

0 commit comments

Comments
 (0)