Skip to content

Commit

Permalink
Merge pull request #457 from GroupProject-JOM/meta
Browse files Browse the repository at this point in the history
Meta test
  • Loading branch information
Buddhikanip authored Mar 5, 2024
2 parents 15c74b3 + 4d31aeb commit 31e310b
Show file tree
Hide file tree
Showing 36 changed files with 267 additions and 128 deletions.
2 changes: 1 addition & 1 deletion admin/collection/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ document.cookie = "final=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
.then((response) => {
if (response.status == 200) {
response.json().then((data) => {
rId.textContent = data.request.id;
rId.textContent = "S/P/"+data.request.id;
sName.textContent = data.request.name + " " + data.request.last_name;
sPhone.textContent = data.request.phone;
address.textContent = data.request.address;
Expand Down
2 changes: 1 addition & 1 deletion admin/employee/view-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
sin: {
oTitle: "සේවකයින් බලන්න",
oText: "සීමාසහිත ජයසිංහ ඔයිල් මිල්ස් (PVT) හි සියලුම සේවකයින් බලන්න",
btn: "සේවකයා එකතු කරන්න",
btn: "සේවකයින් එකතු කරන්න",
},
en: {
oTitle: "View Employees",
Expand Down
2 changes: 1 addition & 1 deletion admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

<div class="widget">
<div class="w-icon">
<span><i class="fa-solid fa-box-open"></i></span>
<span><i class="fa-solid fa-truck-field"></i></span>
</div>
<div class="w-text">
<p class="w-title w2"></p>
Expand Down
4 changes: 2 additions & 2 deletions admin/nav/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</li>
<li class="" id="nav-item-products">
<a href="#" class="products">
<i class="fa-solid fa-box-open icon"></i>
<i class="fa-solid fa-boxes-stacked icon"></i>
<span class="text nav-text l5"></span>
</a>
</li>
Expand All @@ -48,7 +48,7 @@
<span class="text nav-head l6"></span>
<li class="" id="nav-item-index">
<a href="" class="dashboard">
<i class="fas fa-bars-progress icon"></i>
<i class="fas fa-gears icon"></i>
<span class="text nav-text l11"></span>
</a>
</li>
Expand Down
6 changes: 3 additions & 3 deletions admin/nav/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
var data = {
sin: {
l0: "පරිශීලක ක්‍රියා",
l1: "සේවක කළමනාකරණය",
l2: "එකතු කිරීමේ කළමනාකරණය",
l3: "අලෙවිසැල කළමනාකරණය",
l1: "සේවකයින්",
l2: "සැපයුම්",
l3: "අලෙවිසැල්",
l4: "ගබඩා සමාලෝචනය",
l5: "නිෂ්පාදන",
l6: "ප්‍රධාන ක්‍ර්‍රියා",
Expand Down
2 changes: 1 addition & 1 deletion admin/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
t2: "සේවකයින් එක් කරන්න / සංස්කරණය කරන්න / ඉවත් කරන්න",
t3: "සැපයුම් කළමනාකරණය",
t4: "සැපයුම් වාර්තා සංස්කරණය කරන්න",
t5: "අලෙවිසැල කළමනාකරණය",
t5: "අලෙවිසැල් කළමනාකරණය",
t6: "අලෙවිසැල් විස්තර සංස්කරණය කරන්න",
text: "උපකරණ පුවරුව",
},
Expand Down
20 changes: 18 additions & 2 deletions collector/collection-history/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
var lang = getCookie("lang"); // current language

datePicker.addEventListener("input", () => {
search(datePicker.value, pastTable);
if (!checkDate(datePicker.value)) {
if (lang == "sin") {
Command: toastr["error"]("දිනය අතීතයේ විය යුතුය");
} else {
Command: toastr["error"]("Date must be in the past");
}
} else search(datePicker.value, pastTable);
});

var searchBa = document.querySelectorAll(
Expand Down Expand Up @@ -67,7 +73,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";

var data = {
sin: {
cTitle: "අතීත එකතු කිරීම්",
cTitle: "පැරණි එකතු කිරීම්",
cSubTitle: "ඔබගේ සම්පුර්ණ කරන ලද පොල් එකතුව සවිස්තරාත්මකව",
},
en: {
Expand Down Expand Up @@ -129,3 +135,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
Command: toastr["error"](error);
});
})();

function checkDate(date) {
if (date.trim().length === 0) return true;

var selectedDate = new Date(date);
var now = new Date();
now.setDate(now.getDate() - 1);
if (selectedDate < now) return true;
else return false;
}
4 changes: 2 additions & 2 deletions collector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<div class="widgets">
<div class="widget-left widget">
<div class="w-icon">
<span><i class="fa-solid fa-calendar"></i></span>
<span><i class="fa-solid fa-money-bill-trend-up"></i></span>
</div>
<div class="w-text">
<p class="w-title w1"></p>
Expand All @@ -88,7 +88,7 @@
</div>
<div class="widget-right widget">
<div class="w-icon">
<span><i class="fa-solid fa-calendar-check"></i></span>
<span><i class="fa-solid fa-clock-rotate-left"></i></span>
</div>
<div class="w-text">
<p class="w-title w2"></p>
Expand Down
2 changes: 1 addition & 1 deletion collector/nav/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<span class="text nav-head l6"></span>
<li class="" id="nav-item-index">
<a href="" class="dashboard">
<i class="fas fa-bars-progress icon"></i>
<i class="fas fa-gears icon"></i>
<span class="text nav-text l11">Dashboard</span>
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions collector/nav/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
var data = {
sin: {
l0: "පරිශීලක ක්‍රියා",
l1: "ඉදිරියට එන එකතු කිරීම්",
l2: "එකතු කිරීමේ ඉතිහාසය",
l1: "ඉදිරි එකතු කිරීම්",
l2: "පැරණි එකතු කිරීම්",
l6: "ප්‍රධාන ක්‍ර්‍රියා",
l7: "ගිණුම බලන්න",
l8: "ගිණුමෙන් ඉවත් වන්න",
Expand Down
2 changes: 1 addition & 1 deletion collector/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ document.cookie = "final=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
c4: "ඉදිරියට එන එකතු කිරීම්",
c5: "ඉදිරි දින 2 සඳහා ඉදිරි එකතු කිරීම් බලන්න",
c6: "මඟ හැරුණු එකතු කිරීම්",
c7: "ඔබගේ මග හැරුණු පොල් එකතුව බලන්න",
c7: "ඔබගේ මග හැරුණු පොල් එකතු කිරීම් බලන්න",
greet1: "සුභ පැතුම්!",
greet2: "ඔබ අද දින එකතු කිරීම් සියල්ල සම්පූර්ණ කර ඇත",
text: "උපකරණ පුවරුව",
Expand Down
18 changes: 17 additions & 1 deletion collector/upcoming-collections/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
var lang = getCookie("lang"); // current language

datePicker.addEventListener("input", () => {
search(datePicker.value, upcomingTable);
if (!checkDate(datePicker.value)) {
if (lang == "sin") {
Command: toastr["error"]("දිනය අනාගතයේ විය යුතුය");
} else {
Command: toastr["error"]("Date must be in the future");
}
} else search(datePicker.value, upcomingTable);
});

var searchBa = document.querySelectorAll(
Expand Down Expand Up @@ -131,3 +137,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
Command: toastr["error"](error);
});
})();

function checkDate(date) {
if (date.trim().length === 0) return true;

var selectedDate = new Date(date);
var now = new Date();
now.setDate(now.getDate() - 1);
if (selectedDate > now) return true;
else return false;
}
12 changes: 6 additions & 6 deletions common/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ window.addEventListener("load", () => {
});

// load manifest and append meta tags
const meta = document.querySelector("head");
fetch("https://jom-dev.duckdns.org/common/meta.html")
.then((res) => res.text())
.then((data) => {
meta.innerHTML += data;
});
// const meta = document.querySelector("head");
// fetch("https://jom-dev.duckdns.org/common/meta.html")
// .then((res) => res.text())
// .then((data) => {
// meta.innerHTML += data;
// });
4 changes: 2 additions & 2 deletions distributor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<div class="widgets">
<div class="widget-left widget">
<div class="w-icon">
<span><i class="fa-solid fa-building-columns"></i></span>
<span><i class="fa-solid fa-cart-arrow-down"></i></span>
</div>
<div class="w-text">
<p class="w-title w1"></p>
Expand All @@ -122,7 +122,7 @@
</div>
<div class="widget-right widget">
<div class="w-icon">
<span><i class="fa-solid fa-building-columns"></i></span>
<span><i class="fa-solid fa-calendar-check"></i></span>
</div>
<div class="w-text">
<p class="w-title w2"></p>
Expand Down
2 changes: 1 addition & 1 deletion distributor/nav/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<span class="text nav-head l6"></span>
<li class="" id="nav-item-index">
<a href="" class="dashboard">
<i class="fas fa-bars-progress icon"></i>
<i class="fas fa-gears icon"></i>
<span class="text nav-text l11"></span>
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions distributor/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
sin: {
w1: "ලබා ගත් කළ නිෂ්පාදන",
w2: "අද සංචාරයන්",
c1: "අලෙවිසැල්",
c2: "අලෙවිසැල් තොරතුරු බලන්න සහ යාවත්කාලීන කරන්න",
c1: "නිෂ්පාදන දළ විශ්ලේෂණය",
c2: "නිෂ්පාදන තොරතුරු බලන්න",
text: "උපකරණ පුවරුව",
},
en: {
Expand Down
39 changes: 39 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,45 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jayasinghe Oil Mills</title>

<meta
name="description"
content="JOM Business and Manufacturing Process Management System."
/>
<meta name="format-detection" content="telephone=yes" />
<meta name="HandheldFriendly" content="true" />
<meta name="theme-color" content="#000000" />
<meta
name="keywords"
content="JOM, Jayasinghe Oil Mills, Coconut Oil, Sri Lanaka"
/>
<meta property="og:title" content=" Jayasinghe Oil Mills" />

<meta
property="og:image"
content="./common/img/Jayasinghe-Oil-Mils-Logo.jpg"
/>
<meta property="og:url" content="https://jom-dev.duckdns.org/" />
<meta property="og:type" content="website" />

<link
rel="apple-touch-icon"
sizes="180x180"
href="./common/img/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./common/img/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="./common/img/favicon-16x16.png"
/>
<link rel="manifest" href="./site.webmanifest" />

<link rel="stylesheet" href="./common/style.css" />
<link rel="stylesheet" href="./common/index.css" />
<link rel="stylesheet" href="./common/style.css" />
Expand Down
2 changes: 1 addition & 1 deletion production-manager/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</div>
<div class="widget-right widget">
<div class="w-icon">
<span><i class="fa-solid fa-gears"></i></span>
<span><i class="fa-solid fa-arrow-right-arrow-left fa-rotate-90"></i></span>
</div>
<div class="w-text">
<p class="w-title w2"></p>
Expand Down
2 changes: 1 addition & 1 deletion production-manager/nav/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<span class="text nav-head l6"></span>
<li class="" id="nav-item-index">
<a href="" class="dashboard">
<i class="fas fa-bars-progress icon"></i>
<i class="fas fa-gears icon"></i>
<span class="text nav-text l11">Dashboard</span>
</a>
</li>
Expand Down
1 change: 0 additions & 1 deletion production-manager/user-flow.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ input:focus {
.request-amount {
margin-top: 0;
padding-bottom: 2px;
margin-bottom: 40px;
}

.buttons {
Expand Down
4 changes: 2 additions & 2 deletions sales-manager/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<div class="widgets">
<div class="widget-left widget">
<div class="w-icon">
<span><i class="fa-solid fa-building-columns"></i></span>
<span><i class="fa-solid fa-money-bill-trend-up"></i></span>
</div>
<div class="w-text">
<p class="w-title w1"></p>
Expand All @@ -82,7 +82,7 @@
</div>
<div class="widget-right widget">
<div class="w-icon">
<span><i class="fa-solid fa-building-columns"></i></span>
<span><i class="fa-solid fa-file-invoice-dollar"></i></span>
</div>
<div class="w-text">
<p class="w-title w2"></p>
Expand Down
4 changes: 2 additions & 2 deletions sales-manager/nav/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</li>
<li class="" id="nav-item-payouts">
<a href="#" class="payouts">
<i class="fa-solid fa-money-bill-wave icon"></i>
<i class="fa-solid fa-file-invoice-dollar icon"></i>
<span class="text nav-text l4"></span>
</a>
</li>
Expand All @@ -47,7 +47,7 @@
<span class="text nav-head l6"></span>
<li class="" id="nav-item-index">
<a href="" class="dashboard">
<i class="fas fa-bars-progress icon"></i>
<i class="fas fa-gears icon"></i>
<span class="text nav-text l11">Dashboard</span>
</a>
</li>
Expand Down
7 changes: 2 additions & 5 deletions sales-manager/productions/view-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,8 @@
} else if (item.status == 3) {
stat = "rejected";
st = "Terminated";
} else if (item.status == 4) {
stat = "pending";
st = "Ongoing";
} else if (item.status == 5) {
stat = "complete";
} else {
stat = "completed";
st = "Completed";
}

Expand Down
Loading

0 comments on commit 31e310b

Please sign in to comment.