96 lines
4.3 KiB
PHP
Executable File
96 lines
4.3 KiB
PHP
Executable File
@extends('m3::liberty-theme.layout.main')
|
|
@section('title')
|
|
Change Warehouse
|
|
@endsection
|
|
@section('content')
|
|
<div class="container-fluid px-4">
|
|
<h3 class="mt-2">Change Warehouse</h3>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
@if(session('success'))
|
|
<div class="alert alert-success">
|
|
{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
|
|
@if(session('error'))
|
|
<div class="alert alert-danger">
|
|
{{ session('error') }}
|
|
</div>
|
|
@endif
|
|
|
|
<form method="POST" action="{{ route('m3.userprofileupdate') }}">
|
|
@csrf
|
|
<div class="form-group">
|
|
<label for="sonar-input-06ac09682b">User profile</label>
|
|
<input type="text" class="form-control" name="R428US" value="{{ trim($ICM428M->R428US) }}" readonly id="sonar-input-06ac09682b">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="sonar-input-95fa12106e">First Name</label>
|
|
<input type="text" class="form-control" value="{{ trim($ICM428M->R428FIRST) }}" readonly id="sonar-input-95fa12106e">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="sonar-input-a6f8891ebe">Family Name</label>
|
|
<input type="text" class="form-control" value="{{ trim($ICM428M->R428FAMILY) }}" readonly id="sonar-input-a6f8891ebe">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="sonar-select-06ac09682b">Div-Plt-Whs</label>
|
|
<select class="form-select" name="R428DPW" required id="sonar-select-06ac09682b">
|
|
<option value="" disabled hidden>Select</option>
|
|
@foreach ($IC670M as $key => $IC670MR)
|
|
@php
|
|
$selected = $ICM428M->R428CO == $IC670MR->WDCO && $ICM428M->R428WH == $IC670MR->WDWHS && $ICM428M->R428PL == $IC670MR->WDPL ?
|
|
'selected' : '';
|
|
@endphp
|
|
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}" {{ $selected }}>
|
|
{{ trim(Str::upper($IC670MR->WDWNAM)) }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<input type="hidden" name="referrer" id="referrer" value="">
|
|
<div class="form-group mt-3 mb-2">
|
|
<button type="submit" class="btn btn-primary">Update</button>
|
|
<button type="button" class="btn btn-primary" onclick="goBack()">Back</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('scripts')
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
let referrer = document.referrer;
|
|
let currentPage = window.location.href.split('?')[0];
|
|
// Check if referrer is not the same as the current page
|
|
if (referrer && !referrer.startsWith(currentPage)) {
|
|
document.getElementById("referrer").value = referrer;
|
|
}
|
|
});
|
|
|
|
function goBack() {
|
|
let referrer = document.getElementById("referrer").value;
|
|
if (referrer) {
|
|
window.location.href = referrer;
|
|
} else {
|
|
// window.history.back();
|
|
window.history.go(-2);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
|
|
});
|
|
|
|
</script>
|
|
@endsection
|