first commit

This commit is contained in:
dev-chiefworks
2022-05-31 16:21:53 -04:00
commit f76abffdcd
5978 changed files with 1078901 additions and 0 deletions
@@ -0,0 +1,142 @@
<link href="/assets/css/phone_farm_phones/form.css" rel="stylesheet" type="text/css" />
<div class="row mt-3 quote-estimate-form">
<?php if ($this->session->flashdata('error')) { ?>
<div class="col-12">
<div class="alert alert-danger alert-dismissible bg-danger text-white " role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close" style="margin-right: 15px;">
<span aria-hidden="true">&times;</span>
</button>
<strong>Error - </strong> <?php echo $this->session->flashdata('error') ?>
</div>
</div>
<?php } ?>
<div class="col-12 col-sm-6">
<div class="form-group mb-3 <?php echo form_error('phone_name') ? 'has-error' : ''; ?>">
<label for="phone-name">Name</label>
<input type="text"
class="form-control"
id="phone-name"
name="phone_name"
value="<?php echo set_value('phone_name', $phone['phone_name']); ?>"
placeholder="Enter phone name"
>
<div class="invalid-feedback text-danger">
<?php echo form_error('phone_name') ? form_error('phone_name') : '' ?>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="form-group mb-3 <?php echo form_error('phone_model') ? 'has-error' : ''; ?>">
<label for="phone-model">Model</label>
<input type="text"
class="form-control"
id="phone-model"
name="phone_model"
value="<?php echo set_value('phone_model', $phone['phone_model']); ?>"
placeholder="Enter phone model"
>
<div class="invalid-feedback text-danger">
<?php echo form_error('phone_model') ? form_error('phone_model') : '' ?>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="form-group mb-3 <?php echo form_error('phone_vendor') ? 'has-error' : ''; ?>">
<label for="phone-vendor">Vendor</label>
<input type="text"
class="form-control"
id="phone-vendor"
name="phone_vendor"
value="<?php echo set_value('phone_vendor', $phone['phone_vendor']); ?>"
placeholder="Enter phone vendor"
>
<div class="invalid-feedback text-danger">
<?php echo form_error('phone_vendor') ? form_error('phone_vendor') : '' ?>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="form-group mb-3 <?php echo form_error('phone_serial') ? 'has-error' : ''; ?>">
<label for="phone-serial">Serial</label>
<input type="text"
class="form-control"
id="phone-serial"
name="phone_serial"
value="<?php echo set_value('phone_serial', $phone['phone_serial']); ?>"
placeholder="Enter phone serial"
>
<div class="invalid-feedback text-danger">
<?php echo form_error('phone_serial') ? form_error('phone_serial') : '' ?>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="form-group mb-3 <?php echo form_error('ip_address') ? 'has-error' : ''; ?>">
<label for="ip-address">IP Address</label>
<input type="text"
class="form-control"
id="ip-address"
name="ip_address"
value="<?php echo set_value('ip_address', $phone['ip_address']); ?>"
placeholder="Enter ip address"
>
<div class="invalid-feedback text-danger">
<?php echo form_error('ip_address') ? form_error('ip_address') : '' ?>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="form-group mb-3 <?php echo form_error('gps_emulator_port') ? 'has-error' : ''; ?>">
<label for="gps-emulator-port">GPS emulator port</label>
<input type="text"
class="form-control"
id="gps-emulator-port"
name="gps_emulator_port"
value="<?php echo set_value('gps_emulator_port', $phone['gps_emulator_port']); ?>"
placeholder="Enter GPS emulator port"
>
<div class="invalid-feedback text-danger">
<?php echo form_error('gps_emulator_port') ? form_error('gps_emulator_port') : '' ?>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="form-group mb-3 <?php echo form_error('phone_number') ? 'has-error' : ''; ?>">
<label for="phone-number">Number</label>
<input type="text"
class="form-control"
id="phone-number"
name="phone_number"
value="<?php echo set_value('phone_number', $phone['phone_number']); ?>"
placeholder="Enter ip address"
>
<div class="invalid-feedback text-danger">
<?php echo form_error('phone_number') ? form_error('phone_number') : '' ?>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="form-group mr-sm-3 <?php echo form_error('status') ? 'has-error' : ''; ?>">
<label for="status">Status</label>
<select class="form-control select2 w-100" data-toggle="select2" id="status" name="status" allow-search="false">
<?php
foreach($statusOptions as $key=>$value) {
$selected = set_value('status', $phone['status']) == $value ? 'selected' : '';
echo '<option value="' . $value . '"' . $selected . '>' . $key . '</option>';
}
?>
</select>
</div>
</div>
</div>
<script src="/assets/js/pages/quote_estimates/form.js"></script>
@@ -0,0 +1,36 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row align-items-center">
<div class="col-12">
<div class="page-title-box">
<h4 class="page-title">Phone farm phones</h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<h4 class="header-title">Create new phone</h4>
<form action="/phone_farm_phones/store" method="post">
<?php include '_form.php'; ?>
<div class="row">
<div class="col-12 col-sm-12 text-right mt-3">
<div class="btn-group" role="group">
<button type="submit" class="btn btn-primary mr-2">Create</button>
<a href="/phone_farm_phones" class="btn btn-danger">Cancel</a>
</div>
</div>
</div>
</form>
</div> <!-- end card-body -->
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row-->
</div> <!-- container -->
@@ -0,0 +1,36 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row align-items-center">
<div class="col-12">
<div class="page-title-box">
<h4 class="page-title">Phone farm phones</h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<h4 class="header-title">Edit phone <?php echo $phoneId ?></h4>
<form action="/phone_farm_phones/update/<?php echo $phoneId ?>" method="post">
<?php include '_form.php'; ?>
<div class="row">
<div class="col-12 col-sm-12 text-right mt-3">
<div class="btn-group" role="group">
<button type="submit" class="btn btn-primary mr-2">Edit</button>
<a href="/phone_farm_phones" class="btn btn-danger">Cancel</a>
</div>
</div>
</div>
</form>
</div> <!-- end card-body -->
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row-->
</div> <!-- container -->
@@ -0,0 +1,129 @@
<link href="/assets/css/address/list.css" rel="stylesheet" type="text/css" />
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row align-items-center">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right text-right action">
<a href="/phone_farm_phones/create" class="btn btn-success">New phone</a>
</div>
<h4 class="page-title">Phone farm phones</h4>
</div>
</div>
</div>
<!-- end page title -->
<!-- start alert -->
<?php if ($this->session->flashdata('success')) { ?>
<div class="col-12">
<div class="alert alert-success alert-dismissible bg-success text-white border-0" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<?php echo $this->session->flashdata('success') ?>
</div>
</div>
<?php } ?>
<!-- end alert -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<form class="search-block form-inline" id="searchForm" action="/phone_farm_phones" method="get">
<div class="form-group mr-sm-3">
<label for="filter_status" class="sr-only">Status</label>
<select class="form-control select2 w-100" data-toggle="select2" id="statusFilter" name="status" allow-search="false">
<option value="">All</option>
<?php
foreach($statusOptions as $key=>$value) {
$selected = (!empty($filterData['status']) && $filterData['status'] == $value) ? 'selected' : '';
echo '<option value="' . $value . '"' . $selected . '>' . $key . '</option>';
}
?>
</select>
</div>
<button class="btn btn-primary btn-search" id="btnSearch" type="submit">Search</button>
</form>
</div>
<div class="table-responsive-sm">
<table id="trips-datatable" class="table table-sm table-centered mb-0" width="100%">
<thead>
<tr>
<th>id</th>
<th>Name</th>
<th>Model</th>
<th>Vendor</th>
<th>Serial</th>
<th>IP Address</th>
<th>GPS Emulator Port</th>
<th>Number</th>
<th>Status</th>
<th class="actions">Actions</th>
</tr>
</thead>
<tbody class="table-striped">
<?php foreach($list as $item): ?>
<tr>
<td><?php echo $item['id'] ?></td>
<td><?php echo $item['phone_name'] ?></td>
<td><?php echo $item['phone_model'] ?></td>
<td><?php echo $item['phone_vendor'] ?></td>
<td><?php echo $item['phone_serial'] ?></td>
<td><?php echo $item['ip_address'] ?></td>
<td><?php echo $item['gps_emulator_port'] ?></td>
<td><?php echo $item['phone_number'] ?></td>
<td><?php echo $item['status'] ?></td>
<td class="actions">
<a href="/phone_farm_phones/edit/<?php echo $item['id']; ?>" class="btn btn-primary">View</a>
<button
type="button"
class="btn btn-danger btn-remove"
data-id="<?php echo $item['id'] ?>"
data-phone="<?php echo $item['phone_name'] ?>"
data-toggle="modal"
data-target="#remove-phone-warning-modal"
>Remove</button>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
<?php echo $pagination ?>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<!-- end row-->
</div> <!-- container -->
<div id="remove-phone-warning-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="warning-header-modalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header modal-colored-header bg-warning">
<h4 class="modal-title" id="warning-header-modalLabel"></h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<h5 class="mt-0">Remove warning</h5>
<p>This can not be undone. Do you want to conitnue?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-warning" id="removeBtn" data-id="">Continue</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script src="/assets/js/app.js" type="text/javascript"></script>
<script src="/assets/js/pages/phone_farm_phones/list.js" type="text/javascript"></script>