This commit is contained in:
sayliraut
2024-07-10 15:05:13 +05:30
2 changed files with 6 additions and 2 deletions

View File

@@ -186,6 +186,8 @@ $currentPage = 'manage-faq';
<option value="">Select</option>
<option value="1">Customer</option>
<option value="2">Restaurant</option>
<option value="3">Subscription</option>
</select>
</div>
<button type="submit" id="update_faq" class="download-btn-custom mt-4 mx-auto w-25">
@@ -231,7 +233,7 @@ $currentPage = 'manage-faq';
.insertBefore("#zero-config_filter label");
// Insert Filter dropdown
$('<select id="filter" class="form-control"><option value="all">All</option><option value="1">Customer</option><option value="2">Restaurant</option></select>')
$('<select id="filter" class="form-control"><option value="all">All</option><option value="1">Customer</option><option value="2">Restaurant</option><option value="3">Subscription</option></select>')
.insertBefore("#zero-config_filter label");
// Filter FAQ
@@ -246,7 +248,7 @@ $currentPage = 'manage-faq';
} else {
$("#faq-tbody tr").each(function() {
var category = $(this).find('td:eq(3)').text().trim();
if ((filterValue == 1 && category === 'Customer') || (filterValue == 2 && category === 'Restaurant')) {
if ((filterValue == 1 && category === 'Customer') || (filterValue == 2 && category === 'Restaurant') || (filterValue == 3 && category === 'Subscription')) {
$(this).show();
} else {
$(this).hide();

View File

@@ -179,6 +179,8 @@ $currentPage = 'manage-reports';
// Add a timeout to ensure the form data is sent before refreshing
setTimeout(function() {