HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/fieldsblaze-heroku/resources/views/admin/published-announcement.blade.php
@extends('admin.include.master')

@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1>Published Announcement</h1>
                </div>
                <div class="col-sm-6 text-right">
                    <button type="button" class="btn btn-sm btn-outline-info mx-1" data-toggle="modal"
                        data-target="#addAnnouncement">Add New</button>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-12">
                    <form action="{{ url('delete-selected-announcement') }}" method="post" id="deleteSelectedRecord">
                        @csrf
                        <div class="card">
                            <div class="card-header">
                                <a href="{{ ('all-announcement') }}"
                                    class="btn btn-default btn-sm card-title px-2 mx-1">All <span
                                        class="badge badge-info">{{ $AllAnnouncement->count() }}</span></a>
                                <a href="{{ ('published-announcement') }}"
                                    class="btn btn-info btn-sm card-title px-2 mx-1">Published <span
                                        class="badge badge-light">{{ $PublishedAnnouncement->count() }}</a>
                                <a href="{{ ('draft-announcement') }}"
                                    class="btn btn-default btn-sm card-title px-2 mx-1">Draft <span
                                        class="badge badge-info">{{ $DraftAnnouncement->count() }}</a>
                                <a href="{{ ('trash-announcement') }}"
                                    class="btn btn-default btn-sm card-title px-2 mx-1">Deleted <span
                                        class="badge badge-info">{{ $TrashAnnouncement->count() }}</a>
                                <div class="text-right">
                                    <button style="float:right; display:none" type="submit"
                                        class="btn btn-sm btn-outline-info mx-1" id="btn-submit"
                                        value="Delete Selected">Delete Selected</button>
                                </div>
                            </div>
                            <!-- /.card-header -->
                            <div class="card-body">
                                <table id="targetTable" class="table table-sm table-bordered table-striped">
                                    <thead>
                                        <tr>
                                            <th><input type="checkbox" id="checkAll" onchange="selectRecordDelete()">
                                                All</th>
                                            <th>S.N.</th>
                                            <th>Announcement No.</th>
                                            <th>Title</th>
                                            <th>Start Date</th>
                                            <th>End Date</th>
                                            <th>Status</th>
                                            <th>Created at</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @foreach ($PublishedAnnouncement as $announcement)
                                        <tr>
                                            <td align="middle">
                                                <input type="checkbox" id="checkItem" name="SelectedAnnouncement[]" value="{{ $announcement->id }}"
                                                    onchange="selectRecordDelete()">
                                            </td>
                                            <td>{{ $loop->iteration }}</td>
                                            <td><a
                                                    href="{{ url('view-announcement', $announcement->AnnouncementId ) }}">{{
                                                    $announcement->AnnouncementNo }}</a></td>
                                            <td>{{ $announcement->AnnouncementTitle }}</td>
                                            <td>{{ date('d-M-y', strtotime($announcement->StartDate)). ', '.date('h:i
                                                A', strtotime($announcement->StartTime))}}</td>
                                            <td>{{ date('d-M-y', strtotime($announcement->EndDate)). ', '.date('h:i A',
                                                strtotime($announcement->EndTime))}}</td>
                                            <td> @if ($announcement->Status == '1')
                                                <span class="badge badge-success">Published</span>
                                                @else
                                                <span class="badge badge-warning">Draft</span>
                                                @endif
                                            </td>
                                            <td>{{ $announcement->Created_by. ' '.date('d-M-y h:i:s a',
                                                strtotime($announcement->Created_at)) }}</td>
                                            <td>
                                                <div class="btn-group">
                                                    <button type="button"
                                                        class="btn btn-default btn-sm dropdown-toggle dropdown-icon"
                                                        data-toggle="dropdown" aria-expanded="false">
                                                    </button>
                                                    <div class="dropdown-menu dropdown-menu-right" role="menu">
                                                        <a type="button" class="dropdown-item btn btn-default"
                                                            href="{{ url('view-expense', $announcement->AnnouncementId) }}">View</a>
                                                        <button type="button" class="dropdown-item btn btn-default"
                                                            data-id="{{ $announcement->AnnouncementId }}"
                                                            onclick="editRecord('{{ $announcement->AnnouncementId }}')">Edit</button>
                                                        <button type="button" class="dropdown-item btn btn-default"
                                                            data-id="{{ $announcement->AnnouncementId }}"
                                                            onClick="deleteExpense('{{ $announcement->AnnouncementId }}');">Delete</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        @endforeach
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.card-body -->
                        </div>
                    </form>
                    <!-- /.card -->
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
</div>

{{-- Modal Popup --}}
<x-AnnouncementModal />
    <!-- /.content-wrapper -->
    @endsection