pos_activation.blade.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. @extends('backend.layouts.app')
  2. @section('content')
  3. <h4 class="text-center text-muted">{{translate('POS Activation for Salesman')}}</h4>
  4. <div class="row">
  5. <div class="col-lg-4">
  6. <div class="card">
  7. <div class="card-header">
  8. <h5 class="mb-0 h6">{{translate('POS Activation for Salesman')}}</h5>
  9. </div>
  10. <div class="card-body text-center">
  11. <label class="aiz-switch aiz-switch-success mb-0">
  12. <input type="checkbox" onchange="updateSettings(this, 'pos_activation_for_seller')" @if(get_setting('pos_activation_for_seller') == 1) checked @endif>
  13. <span class="slider round"></span>
  14. </label>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. @endsection
  20. @section('script')
  21. <script type="text/javascript">
  22. function updateSettings(el, type){
  23. if($(el).is(':checked')){
  24. var value = 1;
  25. }
  26. else{
  27. var value = 0;
  28. }
  29. $.post('{{ route('business_settings.update.activation') }}', {_token:'{{ csrf_token() }}', type:type, value:value}, function(data){
  30. if(data == '1'){
  31. AIZ.plugins.notify('success', '{{ translate('Settings updated successfully') }}');
  32. }
  33. else{
  34. AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
  35. }
  36. });
  37. }
  38. </script>
  39. @endsection