Skip to content

Commit

Permalink
Document recurring edit form issue solved.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 6, 2022
1 parent ccca2f8 commit 9503149
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
24 changes: 14 additions & 10 deletions resources/views/components/documents/form/recurring.blade.php
Expand Up @@ -4,15 +4,19 @@
</x-slot>

<x-slot name="body">
<x-form.group.recurring
:type="$type"
@started="onChangeRecurringDate"
:frequency="$document ? $document->recurring->frequency : null"
:custom-frequency="$document ? $document->recurring->custom_frequency : null"
:limit="$document ? $document->recurring->limit_by : null"
:started-value="$document ? $document->recurring->started_at : null"
:limit-count="$document ? $document->recurring->limit_count : null"
:limit-date-value="$document ? $document->recurring->limit_date : null"
/>
@if (empty($document))
<x-form.group.recurring :type="$type" @started="onChangeRecurringDate()" />
@else
<x-form.group.recurring
:type="$type"
@started="onChangeRecurringDate()"
:frequency="$document ? $document->recurring->frequency : null"
:custom-frequency="$document ? $document->recurring->custom_frequency : null"
:limit="$document ? $document->recurring->limit_by : null"
:started-value="$document ? $document->recurring->started_at : null"
:limit-count="$document ? $document->recurring->limit_count : null"
:limit-date-value="$document ? $document->recurring->limit_date : null"
/>
@endif
</x-slot>
</x-form.section>
14 changes: 7 additions & 7 deletions resources/views/components/form/group/recurring.blade.php
Expand Up @@ -10,7 +10,7 @@
frequency-value="{{ $frequency }}"
:frequency-error="form.errors.get('recurring_frequency')"
@if ($attributes->has('@frequency'))
@frequency="form.recurring_frequency = $event; {{ $attributes['@frequency'] }}"
@frequency="form.recurring_frequency = $event;{{ $attributes['@frequency'] }}"
@else
@frequency="form.recurring_frequency = $event"
@endif
Expand All @@ -19,20 +19,20 @@
custom-frequency-value="{{ $customFrequency }}"
:custom-frequency-error="form.errors.get('recurring_custom_frequency')"
@if ($attributes->has('@interval'))
@interval="form.recurring_interval = $event; {{ $attributes['@interval'] }}"
@interval="form.recurring_interval = $event;{{ $attributes['@interval'] }}"
@else
@interval="form.recurring_interval = $event"
@endif

@if ($attributes->has('@custom_frequency'))
@custom_frequency="form.recurring_custom_frequency = $event; {{ $attributes['@custom_frequency'] }}"
@custom_frequency="form.recurring_custom_frequency = $event;{{ $attributes['@custom_frequency'] }}"
@else
@custom_frequency="form.recurring_custom_frequency = $event"
@endif

started-value="{{ $startedValue }}"
@if ($attributes->has('@started'))
@started="form.recurring_started_at = $event; {{ $attributes['@started'] }}"
@started="form.recurring_started_at = $event;{{ $attributes['@started'] }}"
@else
@started="form.recurring_started_at = $event"
@endif
Expand All @@ -41,21 +41,21 @@
limit-value="{{ $limit }}"
:limit-error="form.errors.get('recurring_limit')"
@if ($attributes->has('@limit'))
@limit="form.recurring_limit = $event; {{ $attributes['@limit'] }}"
@limit="form.recurring_limit = $event;{{ $attributes['@limit'] }}"
@else
@limit="form.recurring_limit = $event"
@endif

limit-count-value="{{ $limitCount }}"
@if ($attributes->has('@limit_count'))
@limit_count="form.recurring_limit_count = $event; {{ $attributes['@limit_count'] }}"
@limit_count="form.recurring_limit_count = $event;{{ $attributes['@limit_count'] }}"
@else
@limit_count="form.recurring_limit_count = $event"
@endif

limit-date-value="{{ $limitDateValue }}"
@if ($attributes->has('@limit_date'))
@limit_date="form.recurring_limit_date = $event; {{ $attributes['@limit_date'] }}"
@limit_date="form.recurring_limit_date = $event;{{ $attributes['@limit_date'] }}"
@else
@limit_date="form.recurring_limit_date = $event"
@endif
Expand Down

0 comments on commit 9503149

Please sign in to comment.