dashboard modal inprogress

This commit is contained in:
mahdahar 2024-11-13 10:54:24 +07:00
parent e188b141dc
commit 1a41160d94
6 changed files with 50 additions and 189 deletions

View File

@ -15,7 +15,7 @@ class Dashboard extends BaseController {
for xml path('')),1,1,'')
from SP_REQUESTS sr
left join PATIENTS p on p.PATID=sr.PATID
where sr.COLLECTIONDATE between '2024-10-02 00:00' and '2024-10-03 23:59'";
where sr.COLLECTIONDATE between '2023-09-15 00:00' and '2023-09-16 23:59'";
$query = $db->query($sql);
$results = $query->getResultArray();
$data['data'] = $results;

11
app/Controllers/Tubes.php Normal file
View File

@ -0,0 +1,11 @@
<?php
namespace App\Controllers;
class Tubes extends BaseController {
public function collect($access, $sample) {
}
}

View File

@ -136,7 +136,6 @@
<div class="modal fade" id="modal" aria-hidden="true" tabindex="-1">
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
hello from modal
</div>
</div>
</div>

View File

@ -12,18 +12,24 @@ span.badge { cursor:pointer; }
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
</div>
<div class="modal-body">
<div class="modal-body" style='background-color:#F4F6FF'>
<div class="row">
<div class="col-12">
<div class="col-6">
<table class="table table-sm table-borderless">
<tr> <th>Access#</th> <th>:</th> <td><?=$accessnumber;?></td> </tr>
<tr> <th>Pat#</th> <th>:</th> <td><?=$patnumber;?></td> </tr>
<tr> <th>Nama</th> <th>:</th> <td><?=$name;?></td> </tr>
</table>
</div>
<div class="col-6">
<table class="table table-sm table-borderless">
<tr> <th>Access#</th> <th>:</th> <td><?=$accessnumber;?></td> </tr>
<tr> <th>Status</th> <th>:</th> <td><span class="badge bg-orange">Pending</span></td> </tr>
</table>
</div>
</div>
<div class='row'>
<div class="col-12">
<div class="card bg-secondary">
<div class="card bg-white">
<div class="card-body">
<div class="card-title"><h3>Sample List</h3></div>
<table class='table'>
@ -35,15 +41,20 @@ span.badge { cursor:pointer; }
$tubestatus = $row['TUBESTATUS'];
$collstatus = $row['COLLSTATUS'];
echo "\r\n <tr>";
echo "<input type='hidden' name='samptype[$sampletype]' value='0' />\r\n";
if($collstatus==1) { echo " <td class='text-center'><input type='checkbox' class='form-check-input' id='physics' checked disabled></td>"; }
else { echo "<tr> <td class='text-center'><input type='checkbox' class='form-check-input' id='physics' disabled></td>"; }
if($tubestatus==4) { echo "<td class='text-center'><input type='checkbox' class='form-check-input' id='physics' checked disabled></td>"; }
else { echo"<td class='text-center'><input type='checkbox' class='form-check-input' id='physics' disabled></td>"; }
if($collstatus==1) {
echo " <td class='text-center'><input type='checkbox' class='form-check-input' id='coll$sampletype' checked disabled></td>";
} else {
echo " <td class='text-center'><input type='checkbox' class='form-check-input' id='coll$sampletype' disabled></td>";
}
if($tubestatus==4) {
echo "<td class='text-center'><input type='checkbox' class='form-check-input' id='recv$sampletype' checked disabled></td>";
} else {
echo "<td class='text-center'><input type='checkbox' class='form-check-input' id='recv$sampletype' disabled></td>";
}
echo "<td>$sampletext</td>";
echo "<td class='text-center'>
echo "<td>
<span class='badge bg-black text-white'>reprint</span>
<span class='badge bg-black text-white'>collect</span>
<span class='badge bg-black text-white' onclick='collect($sampletype, $accessnumber)'>collect</span>
<span class='badge bg-black text-white'>un-collect</span>
<span class='badge bg-black text-white'>un-receive</span>
</td> ";
@ -52,18 +63,13 @@ span.badge { cursor:pointer; }
?>
<tr>
<td></td> <td></td> <td>Collection</td>
<td class='text-center'>
<span class='badge bg-black text-white'>reprint</span>
<span class='badge bg-black text-white'>collect</span>
<span class='badge bg-black text-white'>un-collect</span>
<span class='badge bg-black text-white'>un-receive</span>
</td>
<td> <span class='badge bg-black text-white'>reprint</span> </td>
</tr>
<tr>
<td></td> <td></td> <td>All</td>
<td class='text-center'>
<td>
<span class='badge bg-black text-white'>reprint</span>
<span class='badge bg-black text-white'>collect</span>
<span class='badge bg-black text-white' onclick='collectAll(<?=$accessnumber;?>)'>collect</span>
<span class='badge bg-black text-white'>un-collect</span>
<span class='badge bg-black text-white'>un-receive</span>
</td>
@ -74,10 +80,17 @@ span.badge { cursor:pointer; }
</div>
</div>
</div>
<!-- <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Understood</button>
</div> -->
<script>
function collect(sample, access) {
const url = '<?=base_url();?>tubes/collect/'+access+'/'+sample;
$("#coll"+sample).prop("checked", true);
}
function collectAll(access) {
const url = '<?=base_url();?>tubes/collectAll/'+access;
$('input[id^="coll"]').prop('checked', true);
}
</script>
<?php
} else {
?>

View File

@ -1,85 +1,3 @@
USE [master]
GO
/****** Object: Database [cmod] Script Date: 08/11/2024 13:57:02 ******/
CREATE DATABASE [cmod]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'cmod', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\cmod.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )
LOG ON
( NAME = N'cmod_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\cmod_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF
GO
ALTER DATABASE [cmod] SET COMPATIBILITY_LEVEL = 160
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [cmod].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [cmod] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [cmod] SET ANSI_NULLS OFF
GO
ALTER DATABASE [cmod] SET ANSI_PADDING OFF
GO
ALTER DATABASE [cmod] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [cmod] SET ARITHABORT OFF
GO
ALTER DATABASE [cmod] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [cmod] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [cmod] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [cmod] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [cmod] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [cmod] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [cmod] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [cmod] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [cmod] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [cmod] SET DISABLE_BROKER
GO
ALTER DATABASE [cmod] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [cmod] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [cmod] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [cmod] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [cmod] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [cmod] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [cmod] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [cmod] SET RECOVERY SIMPLE
GO
ALTER DATABASE [cmod] SET MULTI_USER
GO
ALTER DATABASE [cmod] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [cmod] SET DB_CHAINING OFF
GO
ALTER DATABASE [cmod] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [cmod] SET TARGET_RECOVERY_TIME = 60 SECONDS
GO
ALTER DATABASE [cmod] SET DELAYED_DURABILITY = DISABLED
GO
ALTER DATABASE [cmod] SET ACCELERATED_DATABASE_RECOVERY = OFF
GO
ALTER DATABASE [cmod] SET QUERY_STORE = ON
GO
ALTER DATABASE [cmod] SET QUERY_STORE (OPERATION_MODE = READ_WRITE, CLEANUP_POLICY = (STALE_QUERY_THRESHOLD_DAYS = 30), DATA_FLUSH_INTERVAL_SECONDS = 900, INTERVAL_LENGTH_MINUTES = 60, MAX_STORAGE_SIZE_MB = 1000, QUERY_CAPTURE_MODE = AUTO, SIZE_BASED_CLEANUP_MODE = AUTO, MAX_PLANS_PER_QUERY = 200, WAIT_STATS_CAPTURE_MODE = ON)
GO
USE [cmod]
GO
/****** Object: Table [dbo].[CM_USERS] Script Date: 08/11/2024 13:57:02 ******/
@ -93,7 +11,7 @@ CREATE TABLE [dbo].[CM_USERS](
CONSTRAINT [PK_USERS] PRIMARY KEY CLUSTERED
(
[USERID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[CM_TUBES](
@ -107,7 +25,7 @@ CREATE TABLE [dbo].[CM_TUBES](
CONSTRAINT [PK_TUBES] PRIMARY KEY CLUSTERED
(
[TUBEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY]
) ON [PRIMARY]
GO

80
env
View File

@ -1,80 +0,0 @@
#--------------------------------------------------------------------
# Example Environment Configuration file
#
# This file can be used as a starting point for your own
# custom .env files, and contains most of the possible settings
# available in a default install.
#
# By default, all of the settings are commented out. If you want
# to override the setting, you must un-comment it by removing the '#'
# at the beginning of the line.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
CI_ENVIRONMENT = development
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
# app.baseURL = ''
app.baseURL = 'http://cmod.local'
# If you have trouble with `.`, you could also use `_`.
# app_baseURL = ''
# app.forceGlobalSecureRequests = false
# app.CSPEnabled = false
#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------
# database.default.hostname = localhost
# database.default.database = ci4
# database.default.username = root
# database.default.password = root
# database.default.DBDriver = MySQLi
# database.default.DBPrefix =
# database.default.port = 3306
# If you use MySQLi as tests, first update the values of Config\Database::$tests.
# database.tests.hostname = localhost
# database.tests.database = ci4_test
# database.tests.username = root
# database.tests.password = root
# database.tests.DBDriver = MySQLi
# database.tests.DBPrefix =
# database.tests.charset = utf8mb4
# database.tests.DBCollat = utf8mb4_general_ci
# database.tests.port = 3306
database.default.hostname = localhost
database.default.database = glendb
database.default.username = sa
database.default.password = master
database.default.DBDriver = SQLSRV
database.default.encrypt = false
#database.default.DBPrefix =
database.default.pconnect = false
database.default.port = 1433
#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------
# encryption.key =
#--------------------------------------------------------------------
# SESSION
#--------------------------------------------------------------------
# session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
# session.savePath = null
#--------------------------------------------------------------------
# LOGGER
#--------------------------------------------------------------------
# logger.threshold = 4