multiple bug fixes including sender ID filtering

This commit is contained in:
Kwesi Banson Jnr
2026-04-16 14:22:04 +00:00
parent 72180de8e4
commit 5dbe76dbd4
380 changed files with 175085 additions and 203 deletions

View File

@@ -0,0 +1,84 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li class="active"><a href="{!! url('holidays') !!}">National Holidays</a></li>
<li class="active">New Holiday Entry</li>
</ol>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
New National Holiday
@include('commons.notifications')
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::open(['url' => 'holidays', 'id' => 'holidaysCreateForm', 'class' => 'form-horizontal form-label-left']) !!}
<div class="row">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="nameID">Holiday Name</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('name', old('name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter name , 'id' => 'nameID', 'required' => 'true']) !!}
{!! $errors->first('name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Country</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('country') ? 'has-error' : ''}}">
{!! Form::select('country', $countries, old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Country , 'id' => 'country', 'required' => 'true']) !!}
{!! $errors->first('country', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="eventDate">Event Date</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('event_date') ? 'has-error' : ''}}">
{!! Form::text('event_date', old('event_date'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select event_date , 'id' => 'eventDate', 'required' => 'true']) !!}
{!! $errors->first('event_date', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Submit</button>
&nbsp;
<button type="button" class="btn btn-warning btn-block" id="resetBtn"><i class="fa fa-save"></i> Reset</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript" src="{!! url('public/assets/js/holidays.js') !!}"></script>
<script type="text/javascript">
$(function(){
$('select').select2();
});
</script>
@endsection

View File

@@ -0,0 +1,85 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li class="active"><a href="{!! url('holidays') !!}">Holidays</a></li>
<li class="active">Update Holiday</li>
</ol>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
Update Holiday
@include('commons.notifications')
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::model($holiday, [
'method' => 'PATCH',
'url' => ['holidays', $holiday],
'class' => 'form-horizontal form-label-left'
]) !!}
<div class="row">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="nameID">Holiday Name</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('name', old('name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter name , 'id' => 'nameID', 'required' => 'true']) !!}
{!! $errors->first('quote', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Country</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('country') ? 'has-error' : ''}}">
{!! Form::select('country', $countries, old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Country , 'id' => 'country', 'required' => 'true']) !!}
{!! $errors->first('country', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="eventDate">Event Date</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('event_date') ? 'has-error' : ''}}">
{!! Form::text('event_date', old('event_date'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select event_date , 'id' => 'eventDate', 'required' => 'true']) !!}
{!! $errors->first('event_date', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Submit</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript" src="{!! url('public/assets/js/holidays.js') !!}"></script>
<script type="text/javascript">
$(function(){
$('select').select2();
});
</script>
@endsection

View File

@@ -0,0 +1,146 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('css')
<link href="{!! url('public/assets/vendors/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left">
<div class="title_left">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li class="active">National Holidays </li>
</ol>
</div>
</div>
<div class="title_right">
<div class="row">
<form method="GET" action="{!! url('holidays') !!}">
<div class="col-md-5 col-sm-5 col-xs-12 form-group">
<div style="margin-top:1px; margin-right:-90px;" class="top_search">
</div>
</div>
<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search" style="margin-top: -2px;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here...">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary" style="color: #fff;" type="button">Go!</button>
</span>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-sm-12">
<div class="pull-right"></div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
@include('commons.notifications')
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2> National Holidays IDs </h2>
<div class="pull-right">
<a class="btn btn-primary btn-sm" href="{!! url('holidays/create') !!}"><i class="fa fa-plus-circle"></i> New Holiday Entry</a>
</div>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div>
<button id="holiday-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="holiday-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
</div>
<div id="holidaysTable"></div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script src="{!! url('public/assets/vendors/tabulator/js/tabulator.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/xlsx.full.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/jspdf.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script type="text/javascript">
$(document).ready(function(){
function link(cell, formatterParams){
var url = cell.getValue();
var rowID = cell.getData().id
return "<a href='"+ base_url + "/holidays/"+rowID+"/edit' class='btn btn-link'>"+url+"</a>";
}
var table = new Tabulator("#holidaysTable", {
ajaxURL: "holidays/all",
paginationSize: 15,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Name",
field: "name",
sorter: "string",
},
{
title: "Event Date",
field: "event_date",
sorter: "string",
},
{
title: "Country",
field: "country",
sorter: "string",
},
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#userEditModal').modal('show');
},
});
document.getElementById("holiday-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "holiday-list.xlsx", {sheetName:"Sheet 1"});
});
//trigger download of data.pdf file
document.getElementById("holiday-download-pdf").addEventListener("click", function(){
table.download("pdf", "holiday-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - holiday List", //add title to report
});
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("holidays/all?keyword=" + keyword);
});
});
</script>
@endsection