improve interactivity in Review page
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
$anyColChanges = $numChangedColumns || $numNewColumns || $numRemovedColumns || $colsReordered;
|
||||
|
||||
$anyChanges = $anyRowChanges || $anyColChanges;
|
||||
$anyChanges = ($anyRowChanges || $anyColChanges) && strlen(trim($changeset->note)) > 0;
|
||||
@endphp
|
||||
|
||||
@extends('table.propose.layout')
|
||||
@@ -123,14 +123,20 @@
|
||||
<div class="row">
|
||||
<div class="col-md-7 offset-md-3">
|
||||
@if(user()->ownsTable($table))
|
||||
<a href="" class="btn btn-outline-success {{$anyChanges?'':'disabled'}}">
|
||||
<a href="" id="submit-button" class="btn btn-outline-success {{$anyChanges?'':'disabled'}}">
|
||||
@icon(fa-save fa-pr)Save & Apply
|
||||
</a>
|
||||
@else
|
||||
<a href="" class="btn btn-outline-success {{$anyChanges?'':'disabled'}}">
|
||||
<a href="" id="submit-button" class="btn btn-outline-success {{$anyChanges?'':'disabled'}}">
|
||||
@icon(fa-paper-plane-o fa-pr)Submit for review
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if($anyRowChanges || $anyColChanges)
|
||||
<span class="text-muted ml-3" id="empty-note-prompt">Write a summary to submit your changes.</span>
|
||||
@else
|
||||
<span class="text-danger ml-3">No changes to submit.</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -141,7 +147,10 @@
|
||||
@push('scripts')
|
||||
<script>
|
||||
ready(function () {
|
||||
app.DraftNotePage(@json($table->draftUpdateRoute))
|
||||
app.DraftNotePage({
|
||||
route: @json($table->draftUpdateRoute),
|
||||
anyChanges: @json($anyRowChanges || $anyColChanges)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user