/******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; /*!*********************************************!*\ !*** ./resources/js/admin/personal_note.js ***! \*********************************************/ (function ($) { "use strict"; $('body').on('click', '.js-show-note', function (e) { e.preventDefault(); var $this = $(this); var note = $this.parent().find('input').val(); var html = '
' + '

' + noteLang + '

' + '

' + note + '

' + '
'; Swal.fire({ html: html, showCancelButton: false, showConfirmButton: false, customClass: { content: 'p-0 text-left' }, width: '40rem' }); }); $('body').on('click', '.js-edit-note', function (e) { e.preventDefault(); var $this = $(this); var $tr = $this.closest("tr"); var action = $this.attr('data-action'); var note = $tr.find('.js-note-message').val(); var attachment = $tr.find('.js-note-attachment').val(); var html = "
\n
\n

").concat(personalNoteLang, "

\n\n \n\n
\n \n\n
\n
\n \n
\n \n
\n
\n\n
\n \n \n
\n
\n
"); Swal.fire({ html: html, showCancelButton: false, showConfirmButton: false, customClass: { content: 'p-0 text-left' }, width: '40rem' }); }); $('body').on('click', '.js-save-personal-note', function (e) { e.preventDefault(); var $this = $(this); var $form = $this.closest('form'); var action = $form.attr('action'); var data = $form.serializeObject(); $this.addClass('loadingbar primary').prop('disabled', true); $.post(action, data, function (result) { if (result && result.code === 200) { Swal.fire({ icon: 'success', title: result.title, html: '

' + result.msg + '

', showConfirmButton: false }); setTimeout(function () { window.location.reload(); }, 1500); } }).fail(function (err) { $this.removeClass('loadingbar primary').prop('disabled', false); var errors = err.responseJSON; if (errors && errors.errors) {} }); }); })(jQuery); /******/ })() ;