From fc8e736a31ecad3caf67fc9b299091590ac86dca Mon Sep 17 00:00:00 2001 From: venkateswaran ubuntu Date: Mon, 4 Sep 2023 12:30:30 +0530 Subject: [PATCH] susee --- app/Views/credit_points_list.php | 50 +++++++++++++++++++------------- app/Views/transactions_list.php | 12 ++++++-- app/Views/users_list.php | 12 ++++++-- 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/app/Views/credit_points_list.php b/app/Views/credit_points_list.php index 5d960ad..9bc9f37 100644 --- a/app/Views/credit_points_list.php +++ b/app/Views/credit_points_list.php @@ -194,11 +194,11 @@ $(document).on('click','.manage-credits',function(){
- +
- +
@@ -209,8 +209,8 @@ $(document).on('click','.manage-credits',function(){
- - + + Remarks must be 30 characters
@@ -237,6 +237,19 @@ $(document).on('click','.manage-credits',function(){ } }); + + $('#method').on('click', function(){ + if($(this).val() == 'Others') + { + $('#remarks').prop('required', true); + $('label[for="remarks"]').html('Remarks*'); + } + else + { + $('#remarks').prop('required', false); + $('label[for="remarks"]').text('Remarks'); + } + }); $('#credit').on('click', function(){ if($('#packs').val() == 'CreditPoints') @@ -348,7 +361,9 @@ $(document).on('change','#packs',function(){ title: 'Member Name : (Total Credits : )', // Set your custom PDF title here text: 'PDF', customize: function(doc) { - // You can further customize the PDF here if needed + doc.content[1].table.body.forEach(function(row) { + row.splice(0, 1); // Remove the first column (ID column) + }); } }, { @@ -356,18 +371,24 @@ $(document).on('change','#packs',function(){ title: 'Member Name : (Total Credits : )', // Set your custom print title here text: 'Print', customize: function(win) { - // You can further customize the print output here if needed + $(win.document.body).find('table').find('th:first, td:first').remove(); } }, { extend: 'copy', text: 'Copy', // Set the title for the Copy button titleAttr: 'Copy', // Set the tooltip for the Copy button + exportOptions: { + columns: ':not(:first-child)' // Exclude the first column (ID column) + } }, { extend: 'csv', text: 'CSV', // Set the title for the CSV button title: 'Member Name : (Total Credits : )', // Set your custom print title here + exportOptions: { + columns: ':not(:first-child)' // Exclude the first column (ID column) + } } ] }); @@ -398,7 +419,9 @@ $(document).on('change','.add_or_sub',function(){ $("#credit").val("1"); // Reset Credit to 1 (you can set it to any default value) $("#cost").val($("#costHidden").val()); $('#credit').prop('readonly', false); + $('#cost').prop('readonly', false); $('.changeClass').removeClass('col-md-8').addClass('col-md-12'); + $('label[for="remarks"]').html('Remarks*'); } else { $("#packs").val("CreditPoints"); $('#method option[value="card"]').show(); @@ -407,6 +430,7 @@ $(document).on('change','.add_or_sub',function(){ $("#packs option[value='7']").show(); $('#remarks').prop('required', false); $("#cost").val($("#costHidden").val()); + $('label[for="remarks"]').text('Remarks'); if(packSel == 'CreditPoints'){ $('#count_hide_show').hide(); } @@ -429,20 +453,6 @@ $(document).on('change','.add_or_sub',function(){ - \ No newline at end of file diff --git a/app/Views/transactions_list.php b/app/Views/transactions_list.php index 112ea44..4b82ba8 100644 --- a/app/Views/transactions_list.php +++ b/app/Views/transactions_list.php @@ -159,7 +159,9 @@ $(document).on('click','.order_details',function(){ title: 'Transactions', // Set your custom PDF title here text: 'PDF', customize: function(doc) { - // You can further customize the PDF here if needed + doc.content[1].table.body.forEach(function(row) { + row.splice(0, 1); // Remove the first column (ID column) + }); } }, { @@ -167,18 +169,24 @@ $(document).on('click','.order_details',function(){ title: 'Transactions', // Set your custom print title here text: 'Print', customize: function(win) { - // You can further customize the print output here if needed + $(win.document.body).find('table').find('th:first, td:first').remove(); } }, { extend: 'copy', text: 'Copy', // Set the title for the Copy button titleAttr: 'Copy', // Set the tooltip for the Copy button + exportOptions: { + columns: ':not(:first-child)' // Exclude the first column (ID column) + } }, { extend: 'csv', text: 'CSV', // Set the title for the CSV button title: 'Transactions', // Set your custom print title here + exportOptions: { + columns: ':not(:first-child)' // Exclude the first column (ID column) + } } ], "language": { diff --git a/app/Views/users_list.php b/app/Views/users_list.php index 0c5e2c6..15cdcfd 100644 --- a/app/Views/users_list.php +++ b/app/Views/users_list.php @@ -99,7 +99,9 @@ title: 'Users', // Set your custom PDF title here text: 'PDF', customize: function(doc) { - // You can further customize the PDF here if needed + doc.content[1].table.body.forEach(function(row) { + row.splice(0, 1); // Remove the first column (ID column) + }); } }, { @@ -107,18 +109,24 @@ title: 'Users', // Set your custom print title here text: 'Print', customize: function(win) { - // You can further customize the print output here if needed + $(win.document.body).find('table').find('th:first, td:first').remove(); } }, { extend: 'copy', text: 'Copy', // Set the title for the Copy button titleAttr: 'Copy', // Set the tooltip for the Copy button + exportOptions: { + columns: ':not(:first-child)' // Exclude the first column (ID column) + } }, { extend: 'csv', text: 'CSV', // Set the title for the CSV button title: 'Users', // Set your custom print title here + exportOptions: { + columns: ':not(:first-child)' // Exclude the first column (ID column) + } } ], "language": {