|
@@ -69,12 +69,12 @@ $invoices = $customer->invoices;
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
- <a href="#" data-invoice-uid="{{ $record->uid }}"
|
|
|
|
|
|
+ {{-- <a href="#" data-invoice-uid="{{ $record->uid }}"
|
|
data-uid="{{ $record->customer->uid }}" class="generate-and-visit-ic-pay" native
|
|
data-uid="{{ $record->customer->uid }}" class="generate-and-visit-ic-pay" native
|
|
- target="_blank">Visit</a>
|
|
|
|
|
|
+ target="_blank">Visit</a> --}}
|
|
<a href="#" data-invoice-uid="{{ $record->uid }}"
|
|
<a href="#" data-invoice-uid="{{ $record->uid }}"
|
|
data-uid="{{ $record->customer->uid }}" class="generate-and-copy-ic-pay-url ml-1"
|
|
data-uid="{{ $record->customer->uid }}" class="generate-and-copy-ic-pay-url ml-1"
|
|
- native target="_blank">Copy</a>
|
|
|
|
|
|
+ native target="_blank">Copy Url</a>
|
|
</td>
|
|
</td>
|
|
<td>${{ is_null($record->paid) ? 0 : $record->paid }}</td>
|
|
<td>${{ is_null($record->paid) ? 0 : $record->paid }}</td>
|
|
<td>${{ is_null($record->balance) ? 0 : $record->balance }}</td>
|
|
<td>${{ is_null($record->balance) ? 0 : $record->balance }}</td>
|
|
@@ -129,84 +129,3 @@ $invoices = $customer->invoices;
|
|
</table>
|
|
</table>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
-<script>
|
|
|
|
- (function() {
|
|
|
|
- function init() {
|
|
|
|
- initStagSuggest();
|
|
|
|
- let parentSegment = $('body');
|
|
|
|
- parentSegment.find('input[stag-suggest][target-key][target-field]')
|
|
|
|
- .off('stag-suggest-selected')
|
|
|
|
- .on('stag-suggest-selected', (_e, _input, _data) => {
|
|
|
|
- _input = $(_input);
|
|
|
|
- _input.closest('form').find('input[name="' + _input.attr('target-field') + '"]').val(_data[
|
|
|
|
- _input.attr('target-key')]);
|
|
|
|
- });
|
|
|
|
- parentSegment.find('.copy-target')
|
|
|
|
- .off('click.copy-target')
|
|
|
|
- .on('click.copy-target', function() {
|
|
|
|
- copyTextToClipboard($(this).attr('data-target'));
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- parentSegment.find('.generate-and-visit-ic-portal')
|
|
|
|
- .off('click.generate-and-visit-ic-portal')
|
|
|
|
- .on('click.generate-and-visit-ic-portal', function() {
|
|
|
|
- $.post('/api/session/proLogInAsCustomer', {
|
|
|
|
- customerUid: $(this).attr('data-uid')
|
|
|
|
- }, _data => {
|
|
|
|
- if (!hasResponseError(_data)) {
|
|
|
|
- window.location.href = '/ic/home/' + _data.data;
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- parentSegment.find('.generate-and-copy-ic-portal-url')
|
|
|
|
- .off('click.generate-and-copy-ic-portal-url')
|
|
|
|
- .on('click.generate-and-copy-ic-portal-url', function() {
|
|
|
|
- $.post('/api/session/proLogInAsCustomer', {
|
|
|
|
- customerUid: $(this).attr('data-uid')
|
|
|
|
- }, _data => {
|
|
|
|
- if (!hasResponseError(_data)) {
|
|
|
|
- copyTextToClipboard('{{ config('app.url') }}/ic/home/' + _data.data);
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- parentSegment.find('.generate-and-visit-ic-pay')
|
|
|
|
- .off('click.generate-and-visit-ic-pay')
|
|
|
|
- .on('click.generate-and-visit-ic-pay', function() {
|
|
|
|
- $.post('/api/session/proLogInAsCustomer', {
|
|
|
|
- customerUid: $(this).attr('data-uid')
|
|
|
|
- }, _data => {
|
|
|
|
- if (!hasResponseError(_data)) {
|
|
|
|
- window.location.href = '/ic/pay/' + $(this).attr('data-invoice-uid') + '/' +
|
|
|
|
- _data.data;
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- parentSegment.find('.generate-and-copy-ic-pay-url')
|
|
|
|
- .off('click.generate-and-copy-ic-pay-url')
|
|
|
|
- .on('click.generate-and-copy-ic-pay-url', function() {
|
|
|
|
- $.post('/api/session/proLogInAsCustomer', {
|
|
|
|
- customerUid: $(this).attr('data-uid')
|
|
|
|
- }, _data => {
|
|
|
|
- if (!hasResponseError(_data)) {
|
|
|
|
- copyTextToClipboard('{{ config('app.url') }}/ic/pay/' + $(this).attr(
|
|
|
|
- 'data-invoice-uid') + '/' + _data.data);
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- addMCInitializer('generic-customer-invoices', init, '#generic-customer-invoices')
|
|
|
|
- }).call(window);
|
|
|
|
-</script>
|
|
|