Skip to content

Commit

Permalink
Clean up and style fixings
Browse files Browse the repository at this point in the history
little clean up

style fixings for inline element
  • Loading branch information
dpgraham4401 committed Jun 22, 2022
1 parent 2087d47 commit 283341f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
1 change: 0 additions & 1 deletion apps/api/views/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def post(self, request: Request) -> Response:
new_manifest = ManifestSerializer(data=resp.json)
new_manifest.is_valid()
new_manifest.save()
print(data)
return Response(status=status.HTTP_200_OK, data=data)
except KeyError:
return Response(status=status.HTTP_500_INTERNAL_SERVER_ERROR)
Expand Down
9 changes: 5 additions & 4 deletions apps/trak/templates/trak/site_manifests.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@ <h1 class="h3 mb-0 text-gray-800">{{ site }} Manifests</h1>
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-header bg-light">
<h5 class="modal-title" id="pullManifestModalLabel">Pull Manifests from RCRAInfo by MTN</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<label for="pullMtnInput">Manifest Tracking Number(s):</label>
<input id="pullMtnInput" type="text" name="mtn">
<input id="pullMtnInput" type="text" class="form-control" name="mtn">
<i class="text-muted d-flex justify-content-end">Separate MTN by spaces</i>
<div id="pullMtnRespBox" class="py-2 px-5 bg-light rounded">
<div id="pullMtnRespBox" class="justify-content-start px-5 py-1 mr-5 bg-light rounded"
style="min-height: 60px">
<ul id="pullMtnRespList" class="list-unstyled">

<!-- Pull manifest Response box-->
</ul>
</div>
</div>
Expand Down
27 changes: 14 additions & 13 deletions static/js/trak/manifest-pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,24 @@ function outputPullMtn(response) {
let pullMtnRespList = document.getElementById("pullMtnRespList")
response.mtn.forEach((mtn) => {
let li = document.createElement("li")
li.classList.add("d-flex")
li.classList.add("justify-content-between")
li.classList.add("d-flex", "justify-content-between")
let newMtn = document.createElement("p")
newMtn.innerText = Object.keys(mtn)[0]
newMtn.classList.add("h4", "font-weight-bold")
li.appendChild(newMtn)
if (mtn[Object.keys(mtn)[0]] === 200) {
let newMtnStatus = document.createElement("i")
newMtnStatus.classList.add("fa-solid")
newMtnStatus.classList.add("fa-circle-check")
newMtnStatus.classList.add("text-success")
li.appendChild(newMtnStatus)
let wrapStatusDiv = document.createElement("div")
wrapStatusDiv.classList.add("d-inline")
let newMtnStatus = document.createElement("i")
newMtnStatus.classList.add("fa-xl", "fa-solid")
let status = Boolean(mtn[Object.keys(mtn)[0]] < 200 && mtn[Object.keys(mtn)[0]] > 300)
if (status) {
newMtnStatus.classList.add("fa-circle-check", "text-success")
wrapStatusDiv.appendChild(newMtnStatus)
li.appendChild(wrapStatusDiv)
} else {
let newMtnStatus = document.createElement("i")
newMtnStatus.classList.add("fa-solid")
newMtnStatus.classList.add("fa-circle-xmark")
newMtnStatus.classList.add("text-danger")
li.appendChild(newMtnStatus)
newMtnStatus.classList.add("fa-circle-xmark", "text-danger")
wrapStatusDiv.appendChild(newMtnStatus)
li.appendChild(wrapStatusDiv)
}
pullMtnRespList.appendChild(li)
})
Expand Down

0 comments on commit 283341f

Please sign in to comment.