Vendor & contractor integration
This commit is contained in:
348
index.php
348
index.php
@@ -158,9 +158,22 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
echo $VisitActions->endVisit($_POST['endvisit'], $StaticFunctions->getUTC());
|
||||
}
|
||||
}
|
||||
|
||||
// VOID VISIT IF POSTED
|
||||
if (!empty($_POST['voidvisit'])) {
|
||||
echo $VisitActions->voidVisit($_POST['voidvisit'], "0", $_POST['voidnotes']);
|
||||
}
|
||||
|
||||
// UPDATE VENDOR RECORD IF POSTED
|
||||
if (!empty($_POST['updateinitialvendorvisit'])) {
|
||||
echo $VisitActions->setInfoVendorVisitInitial($_POST['db_vendorinfo_id'], $_POST['db_vendorinfo_contact1'], $_POST['db_vendorinfo_contact2'], $_POST['db_vendorinfo_workstart'], $_POST['db_vendorinfo_workend'], $_POST['db_vendorinfo_checklistrequired'], $_POST['db_vendorinfo_routinework'], $_POST['db_vendorinfo_nonroutinework'], $_POST['db_vendorinfo_coi'], $_POST['db_vendorinfo_worksummary'], $_POST['db_vendorinfo_equipmentsummary'] );
|
||||
}
|
||||
|
||||
// FINALIZE VENDOR RECORD IF POSTED
|
||||
if (!empty($_POST['updatefinalvendorvisit'])) {
|
||||
echo $VisitActions->setInfoVendorVisitFinal($_POST['db_vendorinfo_id'], $_POST['db_vendorinfo_checklistcompleted'], $_POST['db_vendorinfo_workcompleted'], $_POST['db_vendorinfo_sitecleanup'], $uid, $_POST['db_vendorinfo_doccompleted'] );
|
||||
}
|
||||
|
||||
// If post is approved, save after error checking.
|
||||
if (!empty($_POST['approvevisit'])) {
|
||||
if (empty($_POST['id_type'])) { $id_type_error="1"; }
|
||||
@@ -231,7 +244,7 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal"><?php echo $transLang['CANCEL']; ?></button>
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal"><i class="fas fa-ban"></i> <?php echo $transLang['CANCEL']; ?></button>
|
||||
<button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-thumbs-down"></i> <?php echo $transLang['DECLINE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -279,19 +292,308 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
$timein_disp = $timein->format('Y-m-d H:i:s');
|
||||
if(!empty($row['visits_carnum'])) { $carnum=$row['visits_carnum']; } else { $carnum="";};
|
||||
if(!empty($row['visits_ssanum'])) { $ssanum=$row['visits_ssanum']; } else { $ssanum="";};
|
||||
if(!empty($row['visits_isvendor'])) { $isvendor=$row['visits_isvendor']; } else { $isvendor="";};
|
||||
if(!empty($row['visits_approved'])) { $visitapproved=$row['visits_approved']; } else { $visitapproved="";};
|
||||
?>
|
||||
|
||||
|
||||
<?php if($isvendor===1 && $visitapproved===1){ ?>
|
||||
<!-- START INITIAL VENDOR FORM MODAL -->
|
||||
<?php foreach ($VisitInfo->getInfoVendorVisitInitial($visitid) as $rowvn) {
|
||||
$db_vendorinfo_id = $rowvn['db_vendorinfo_id'];
|
||||
$db_vendorinfo_contact1 = $rowvn['db_vendorinfo_contact1'];
|
||||
$db_vendorinfo_contact2 = $rowvn['db_vendorinfo_contact2'];
|
||||
$db_vendorinfo_workstart = $rowvn['db_vendorinfo_workstart'];
|
||||
$db_vendorinfo_workend = $rowvn['db_vendorinfo_workend'];
|
||||
$db_vendorinfo_checklistrequired= $rowvn['db_vendorinfo_checklistrequired'];
|
||||
$db_vendorinfo_routinework = $rowvn['db_vendorinfo_routinework'];
|
||||
$db_vendorinfo_nonroutinework = $rowvn['db_vendorinfo_nonroutinework'];
|
||||
$db_vendorinfo_coi = $rowvn['db_vendorinfo_coi'];
|
||||
$db_vendorinfo_worksummary = $rowvn['db_vendorinfo_worksummary'];
|
||||
$db_vendorinfo_equipmentsummary = $rowvn['db_vendorinfo_equipmentsummary'];
|
||||
if ($db_vendorinfo_routinework === 1 || $db_vendorinfo_nonroutinework === 1) {
|
||||
if (!empty($db_vendorinfo_worksummary) && !empty($db_vendorinfo_equipmentsummary)){$initialvendorformcomplete=1;};
|
||||
} else $initialvendorformcomplete=0;
|
||||
?>
|
||||
<div class="modal fade" id="vendorModal-<?php echo $visitid; ?>" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header text-light bg-secondary">
|
||||
<h5 class="modal-title" id="termsModalLongTitle"><?php echo $transLang['VENDORINFO-FORM']; ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post">
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<input type="hidden" name="updateinitialvendorvisit" id="updateinitialvendorvisit" value="updateinitialvendorvisit" />
|
||||
<input type="hidden" name="db_vendorinfo_id" id="db_vendorinfo_id" value="<?php echo $db_vendorinfo_id; ?>" />
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT1']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_contact1" name="db_vendorinfo_contact1" placeholder="<?php echo $db_vendorinfo_contact1; ?>" value="<?php echo $db_vendorinfo_contact1; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT2']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_contact2" name="db_vendorinfo_contact2" placeholder="<?php echo $db_vendorinfo_contact2; ?>" value="<?php echo $db_vendorinfo_contact2; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-WORKSTART']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_workstart" name="db_vendorinfo_workstart" placeholder="<?php echo $db_vendorinfo_workstart; ?>" value="<?php echo $db_vendorinfo_workstart; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-WORKEND']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_workend" name="db_vendorinfo_workend" placeholder="<?php echo $db_vendorinfo_workend; ?>" value="<?php echo $db_vendorinfo_workend; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_checklistrequired" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_checklistrequired" value="1" type="checkbox" id="db_vendorinfo_checklistrequired" <?php if (isset($db_vendorinfo_checklistrequired) && $db_vendorinfo_checklistrequired === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_checklistrequired"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-CHECKLISTREQUIRED-HELP']; ?>"><?php echo $transLang['VENDORINFO-CHECKLISTREQUIRED']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_routinework" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_routinework" value="1" type="checkbox" id="db_vendorinfo_routinework" <?php if (isset($db_vendorinfo_routinework) && $db_vendorinfo_routinework === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_routinework"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-ROUTINEWORK-HELP']; ?>"><?php echo $transLang['VENDORINFO-ROUTINEWORK']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_coi" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_coi" value="1" type="checkbox" id="db_vendorinfo_coi" <?php if (isset($db_vendorinfo_coi) && $db_vendorinfo_coi === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_coi"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-COI-HELP']; ?>"><?php echo $transLang['VENDORINFO-COI']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_nonroutinework" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_nonroutinework" value="1" type="checkbox" id="db_vendorinfo_nonroutinework" <?php if (isset($db_vendorinfo_nonroutinework) && $db_vendorinfo_nonroutinework === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_nonroutinework"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-NONROUTINEWORK-HELP']; ?>"><?php echo $transLang['VENDORINFO-NONROUTINEWORK']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-WORKSUMMARY-HELP']; ?>"><span class="input-group-text"><?php echo $transLang['VENDORINFO-WORKSUMMARY']; ?></span></span>
|
||||
<input class="form-control" id="db_vendorinfo_worksummary" name="db_vendorinfo_worksummary" placeholder="<?php echo $db_vendorinfo_worksummary; ?>" value="<?php echo $db_vendorinfo_worksummary; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-EQUIPMENTSUMMARY-HELP']; ?>"><span class="input-group-text"><?php echo $transLang['VENDORINFO-EQUIPMENTSUMMARY']; ?></span></span>
|
||||
<input class="form-control" id="db_vendorinfo_equipmentsummary" name="db_vendorinfo_equipmentsummary" placeholder="<?php echo $db_vendorinfo_equipmentsummary; ?>" value="<?php echo $db_vendorinfo_equipmentsummary; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><i class="fas fa-ban"></i> <?php echo $transLang['CANCEL']; ?></button>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<button type="submit" class="btn btn-success"><i class="fas fa-save"></i> <?php echo $transLang['SAVE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END INITIAL VENDOR FORM MODAL -->
|
||||
<?php }; }; ?>
|
||||
|
||||
|
||||
<?php if($isvendor===1 && $visitapproved===2){ ?>
|
||||
<!-- START FINAL VENDOR FORM MODAL -->
|
||||
<?php foreach ($VisitInfo->getInfoVendorVisitFinal($visitid) as $rowvm) {
|
||||
$db_vendorinfo_id = $rowvm['db_vendorinfo_id'];
|
||||
$db_vendorinfo_contact1 = $rowvm['db_vendorinfo_contact1'];
|
||||
$db_vendorinfo_contact2 = $rowvm['db_vendorinfo_contact2'];
|
||||
$db_vendorinfo_workstart = $rowvm['db_vendorinfo_workstart'];
|
||||
$db_vendorinfo_workend = $rowvm['db_vendorinfo_workend'];
|
||||
$db_vendorinfo_checklistrequired = $rowvm['db_vendorinfo_checklistrequired'];
|
||||
$db_vendorinfo_routinework = $rowvm['db_vendorinfo_routinework'];
|
||||
$db_vendorinfo_nonroutinework = $rowvm['db_vendorinfo_nonroutinework'];
|
||||
$db_vendorinfo_coi = $rowvm['db_vendorinfo_coi'];
|
||||
$db_vendorinfo_worksummary = $rowvm['db_vendorinfo_worksummary'];
|
||||
$db_vendorinfo_equipmentsummary = $rowvm['db_vendorinfo_equipmentsummary'];
|
||||
$db_vendorinfo_checklistcompleted = $rowvm['db_vendorinfo_checklistcompleted'];
|
||||
$db_vendorinfo_workcompleted = $rowvm['db_vendorinfo_workcompleted'];
|
||||
$db_vendorinfo_sitecleanup = $rowvm['db_vendorinfo_sitecleanup'];
|
||||
$db_vendorinfo_doccompleted = $rowvm['db_vendorinfo_doccompleted'];
|
||||
if ($db_vendorinfo_workcompleted === 1 && $db_vendorinfo_sitecleanup === 1) { $finalvendorformcomplete=1; } else { $finalvendorformcomplete=0; };
|
||||
?>
|
||||
<div class="modal fade" id="vendorFinalModal-<?php echo $visitid; ?>" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header text-light bg-secondary">
|
||||
<h5 class="modal-title" id="termsModalLongTitle"><?php echo $transLang['VENDORINFO-FORM']; ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post">
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<input type="hidden" name="updatefinalvendorvisit" id="updatefinalvendorvisit" value="updatefinalvendorvisit" />
|
||||
<input type="hidden" name="db_vendorinfo_id" id="db_vendorinfo_id" value="<?php echo $db_vendorinfo_id; ?>" />
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT1']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_contact1" name="db_vendorinfo_contact1" placeholder="<?php echo $db_vendorinfo_contact1; ?>" value="<?php echo $db_vendorinfo_contact1; ?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT2']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_contact2" name="db_vendorinfo_contact2" placeholder="<?php echo $db_vendorinfo_contact2; ?>" value="<?php echo $db_vendorinfo_contact2; ?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-WORKSTART']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_workstart" name="db_vendorinfo_workstart" placeholder="<?php echo $db_vendorinfo_workstart; ?>" value="<?php echo $db_vendorinfo_workstart; ?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-WORKEND']; ?></span>
|
||||
<input class="form-control" id="db_vendorinfo_workend" name="db_vendorinfo_workend" placeholder="<?php echo $db_vendorinfo_workend; ?>" value="<?php echo $db_vendorinfo_workend; ?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_checklistrequired" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_checklistrequired" value="1" type="checkbox" id="db_vendorinfo_checklistrequired" <?php if (isset($db_vendorinfo_checklistrequired) && $db_vendorinfo_checklistrequired === 1) echo "checked";?> disabled>
|
||||
<label class="form-check-label" for="db_vendorinfo_checklistrequired"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-CHECKLISTREQUIRED-HELP']; ?>"><?php echo $transLang['VENDORINFO-CHECKLISTREQUIRED']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_routinework" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_routinework" value="1" type="checkbox" id="db_vendorinfo_routinework" <?php if (isset($db_vendorinfo_routinework) && $db_vendorinfo_routinework === 1) echo "checked";?> disabled>
|
||||
<label class="form-check-label" for="db_vendorinfo_routinework"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-ROUTINEWORK-HELP']; ?>"><?php echo $transLang['VENDORINFO-ROUTINEWORK']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_coi" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_coi" value="1" type="checkbox" id="db_vendorinfo_coi" <?php if (isset($db_vendorinfo_coi) && $db_vendorinfo_coi === 1) echo "checked";?> disabled>
|
||||
<label class="form-check-label" for="db_vendorinfo_coi"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-COI-HELP']; ?>"><?php echo $transLang['VENDORINFO-COI']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_nonroutinework" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_nonroutinework" value="1" type="checkbox" id="db_vendorinfo_nonroutinework" <?php if (isset($db_vendorinfo_nonroutinework) && $db_vendorinfo_nonroutinework === 1) echo "checked";?> disabled>
|
||||
<label class="form-check-label" for="db_vendorinfo_nonroutinework"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-NONROUTINEWORK-HELP']; ?>"><?php echo $transLang['VENDORINFO-NONROUTINEWORK']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-WORKSUMMARY-HELP']; ?>"><span class="input-group-text"><?php echo $transLang['VENDORINFO-WORKSUMMARY']; ?></span></span>
|
||||
<input class="form-control" id="db_vendorinfo_worksummary" name="db_vendorinfo_worksummary" placeholder="<?php echo $db_vendorinfo_worksummary; ?>" value="<?php echo $db_vendorinfo_worksummary; ?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-EQUIPMENTSUMMARY-HELP']; ?>"><span class="input-group-text"><?php echo $transLang['VENDORINFO-EQUIPMENTSUMMARY']; ?></span></span>
|
||||
<input class="form-control" id="db_vendorinfo_equipmentsummary" name="db_vendorinfo_equipmentsummary" placeholder="<?php echo $db_vendorinfo_equipmentsummary; ?>" value="<?php echo $db_vendorinfo_equipmentsummary; ?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_checklistcompleted" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_checklistcompleted" value="1" type="checkbox" id="db_vendorinfo_checklistcompleted" <?php if (isset($db_vendorinfo_checklistcompleted) && $db_vendorinfo_checklistcompleted === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_checklistcompleted"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-CHECKLISTCOMPLETED-HELP']; ?>"><?php echo $transLang['VENDORINFO-CHECKLISTCOMPLETED']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_workcompleted" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_workcompleted" value="1" type="checkbox" id="db_vendorinfo_workcompleted" <?php if (isset($db_vendorinfo_workcompleted) && $db_vendorinfo_workcompleted === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_workcompleted"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-WORKCOMPLETED-HELP']; ?>"><?php echo $transLang['VENDORINFO-WORKCOMPLETED']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_sitecleanup" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_sitecleanup" value="1" type="checkbox" id="db_vendorinfo_sitecleanup" <?php if (isset($db_vendorinfo_sitecleanup) && $db_vendorinfo_sitecleanup === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_sitecleanup"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-SITECLEANUP-HELP']; ?>"><?php echo $transLang['VENDORINFO-SITECLEANUP']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="db_vendorinfo_doccompleted" value="0" />
|
||||
<input class="form-check-input" name="db_vendorinfo_doccompleted" value="1" type="checkbox" id="db_vendorinfo_doccompleted" <?php if (isset($db_vendorinfo_doccompleted) && $db_vendorinfo_doccompleted === 1) echo "checked";?>>
|
||||
<label class="form-check-label" for="db_vendorinfo_doccompleted"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['VENDORINFO-DOCCOMPLETED-HELP']; ?>"><?php echo $transLang['VENDORINFO-DOCCOMPLETED']; ?></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><i class="fas fa-ban"></i> <?php echo $transLang['CANCEL']; ?></button>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<button type="submit" class="btn btn-success"><i class="fas fa-save"></i> <?php echo $transLang['SAVE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END FINAL VENDOR FORM MODAL -->
|
||||
<?php }; }; ?>
|
||||
|
||||
|
||||
<?php if($row['visits_approved']==2) { ?>
|
||||
<tr class="alert alert-success">
|
||||
<?php } else { ?>
|
||||
<tr class="alert alert-warning">
|
||||
<?php }; ?>
|
||||
<form class="form form-approve" method="post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form class="form form-approve" method="post">
|
||||
<td class="small">
|
||||
<div>
|
||||
<span class="badge bg-light text-dark"><?php echo $timein_disp; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="badge bg-light text-dark"><?php echo $transLang[$VisitTypeInfo->getVisitTypeInfo($row['visits_reason'])[0]["visittypes_name"]]; ?></span>
|
||||
<span class="badge bg-light text-dark"><?php echo $transLang[$VisitTypeInfo->getInfoVisitType("%", $row['visits_reason'])[0]["visittypes_name"]]; ?></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="small"><?php echo $row['visits_lastname'] . ", " . $row['visits_firstname']; ?><br><img src="<?php echo $row['visits_signature']; ?>" width="200" height="50"></img></td>
|
||||
@@ -319,20 +621,30 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
<div>
|
||||
<span class="badge bg-light text-dark"><?php echo $transLang['SIGNINBY']; ?></span> <?php echo $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_firstname"] . " " . $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_lastname"]; ?>
|
||||
</div>
|
||||
<?php if($isvendor===1) { ?>
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<?php if ($finalvendorformcomplete===1) { ?>
|
||||
<span class="badge bg-success text-dark"><?php echo $transLang['TAGS-FORMCOMPLETE']; ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="badge bg-info text-dark"><?php echo $transLang['TAGS-FORMINCOMPLETE']; ?></span>
|
||||
<?php }; ?>
|
||||
<a data-bs-toggle="modal" data-bs-target="#vendorFinalModal-<?php echo $visitid; ?>" data-id="<?php echo $visitid; ?>" href="#vendorFinalModal-<?php echo $visitid; ?>" name="vendorFinalModal-<?php echo $visitid; ?>" value="<?php echo $visitid; ?>" class="open-vendorFinalModal-<?php echo $visitid; ?>"><?php echo $transLang['VENDORINFO-FORM']; ?></a>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
</td>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<td class="small"><?php echo $carnum; ?> / <?php echo $ssanum; ?></td>
|
||||
<?php }; ?>
|
||||
<td class="small">
|
||||
<div class="input-group input-group-sm mb-0 d-grid gap-2">
|
||||
<button type="submit" name="endvisit" value="<?php echo $row['visits_id']; ?>" class="btn btn-warning btn-block btn-sm"><i class="fas fa-sign-out-alt"></i> <?php echo $transLang['SIGNOUT']; ?></button>
|
||||
<button type="submit" name="endvisit" value="<?php echo $visitid; ?>" class="btn btn-warning btn-block btn-sm <?php if ($isvendor===1 && $finalvendorformcomplete===0) { echo "disabled"; }; ?>"><i class="fas fa-sign-out-alt"></i> <?php echo $transLang['SIGNOUT']; ?></button>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><i class="fas fa-clock"></i></span>
|
||||
<input placeholder="<?php echo $transLang['OPTIONAL']; ?>" name="outtime" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-<?php echo $row['visits_id']; ?>" id="datetimepicker-<?php echo $row['visits_id']; ?>" data-toggle="datetimepicker" data-target=".datetimepicker-<?php echo $row['visits_id']; ?>"/>
|
||||
<span class="input-group-text" data-bs-toggle="datetimepicker" data-target=".datetimepicker-<?php echo $visitid; ?>"><i class="fas fa-clock"></i></span>
|
||||
<input placeholder="<?php echo $transLang['OPTIONAL']; ?>" name="outtime" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-<?php echo $visitid; ?>" id="datetimepicker-<?php echo $visitid; ?>" data-toggle="datetimepicker" data-target=".datetimepicker-<?php echo $visitid; ?>"/>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.datetimepicker-<?php echo $row['visits_id']; ?>').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
|
||||
$('.datetimepicker-<?php echo $visitid; ?>').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -340,7 +652,7 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
<?php } else { ?>
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><?php echo $transLang['ID_TYPE']; ?></span>
|
||||
<select class="form-control form-control-sm bg-white form-select<?php if( isset($id_type_error) && $id_type_error === 1 && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" id="id_type-<?php echo $row['visits_id']; ?>" aria-label="ID Type" name="id_type">
|
||||
<select class="form-control form-control-sm bg-white form-select<?php if( isset($id_type_error) && $id_type_error === 1 && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" id="id_type-<?php echo $visitid; ?>" aria-label="ID Type" name="id_type">
|
||||
<option value="" selected><?php echo $transLang['SELECTID']; ?></option>
|
||||
<?php foreach($IDTypeInfo->getIDTypeInfo("%") as $row): ?>
|
||||
<option value="<?php echo $row['idtypes_id']; ?>"><?php echo $transLang[$row['idtypes_name']]; ?></option>
|
||||
@@ -401,6 +713,18 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
<input type="text" id="badge" name="badge" class="form-control form-control-sm bg-white<?php if( isset($badge_error) && $badge_error == "1" && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" autofocus maxlength="15">
|
||||
<div class="invalid-feedback"><?php echo $transLang['REQUIRED']; ?></div>
|
||||
</div>
|
||||
<?php if($isvendor===1) { ?>
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<?php if ($initialvendorformcomplete===1) { ?>
|
||||
<span class="badge bg-success text-dark"><?php echo $transLang['TAGS-FORMCOMPLETE']; ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="badge bg-info text-dark"><?php echo $transLang['TAGS-FORMINCOMPLETE']; ?></span>
|
||||
<?php }; ?>
|
||||
<a data-bs-toggle="modal" data-bs-target="#vendorModal-<?php echo $visitid; ?>" data-id="<?php echo $visitid; ?>" href="#vendorModal-<?php echo $visitid; ?>" name="vendorModal-<?php echo $visitid; ?>" value="<?php echo $visitid; ?>" class="open-vendorModal-<?php echo $visitid; ?>"><?php echo $transLang['VENDORINFO-FORM']; ?></a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php }; ?>
|
||||
<input class="form-control form-control-sm" type="hidden" id="initials" name="initials" placeholder="<?php echo $uid; ?>" value="<?php echo $uid; ?>">
|
||||
</td>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
@@ -408,13 +732,13 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
<?php }; ?>
|
||||
<td class="small">
|
||||
<div class="input-group input-group-sm mb-0 d-grid gap-2">
|
||||
<button type="submit" name="approvevisit" id="approvevisit-<?php echo $visitid; ?>" value="<?php echo $visitid; ?>" class="btn btn-success btn-block btn-sm"><i class="fas fa-thumbs-up"></i> <?php echo $transLang['APPROVE']; ?></button>
|
||||
<button type="submit" name="approvevisit" id="approvevisit-<?php echo $visitid; ?>" value="<?php echo $visitid; ?>" class="btn btn-success btn-block btn-sm <?php if ($isvendor===1 && $initialvendorformcomplete===0) { echo "disabled"; }; ?>"><i class="fas fa-thumbs-up"></i> <?php echo $transLang['APPROVE']; ?></button>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb-0 d-grid gap-2">
|
||||
<a data-bs-toggle="modal" data-bs-target="#voidModal" data-id="<?php echo $visitid; ?>" href="#voidModal" name="voidvisit" value="<?php echo $visitid; ?>" class="btn btn-danger btn-block btn-sm open-voidModal"><i class="fas fa-thumbs-down"></i> <?php echo $transLang['DECLINE']; ?></a>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text"><i class="fas fa-clock"></i></span>
|
||||
<span class="input-group-text" data-bs-toggle="datetimepicker" data-target=".datetimepicker-<?php echo $visitid; ?>"><i class="fas fa-clock"></i></span>
|
||||
<input placeholder="<?php echo $transLang['OPTIONAL']; ?>" name="outtime" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-<?php echo $visitid; ?>" id="datetimepicker-<?php echo $visitid; ?>" data-toggle="datetimepicker" data-target=".datetimepicker-<?php echo $visitid; ?>" />
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@@ -425,7 +749,11 @@ if (Registry::AUTHMETHOD == 'SAML') {
|
||||
</td>
|
||||
<?php }; ?>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user