Commit 4fb9705b authored by Thiwanka K.A.T's avatar Thiwanka K.A.T 🎯

Merge branch 'IT19076362' into 'master'

CREATE: full screen loader added

See merge request !89
parents f5a7eeca 77f73f5b
No preview for this file type
class WarehouseOperator:
def create_orders_by_uploading_a_CSV_file(self):
pass
def make_adjustments_to_the_order(self):
pass
def allocate_a_vehicle_for_a_job(self):
pass
def change_the_system_suggested_optimized_route_if_required(self):
pass
def confirm_a_job(self):
pass
def change_the_vehicle_allocated_for_a_job(self):
pass
def export_information_of_a_job_to_pdf_and_xls_format(self):
pass
def indicate_that_the_loading_is_completed(self):
pass
def generate_an_invoice_for_each_vehicle(self):
pass
def generate_vehicle_capacity_utilization_report(self):
pass
def generate_outlet_wise_transport_cost_report_for_a_given_date_range(self):
pass
def generate_vehicle_turnaround_time_report_for_a_warehouse(self):
pass
def generate_cost_per_1_kg_report(self):
pass
def generate_an_idle_time_limit_violation_report(self):
pass
class WarehouseIncharge:
def confirm_the_delivered_items_to_a_outlet(self):
pass
def approve_a_job(self):
pass
def request_a_modification_to_the_planned_mileage_of_a_job(self):
pass
class Admin:
def approve_the_planned_mileage_modification_request_submitted_by_the_WarehouseIncharge(self):
pass
def modify_the_minimum_fix_mileage_configuration_for_a_job(self):
pass
def modify_the_unloading_charge(self):
pass
def update_the_radius_limit_from_a_warehouse_for___drop_off___charges(self):
pass
def set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited(self):
pass
def modify_the___drop_off___rate_table(self):
pass
def edit_the_eligibility_criteria_for_driver_incentive(self):
pass
def edit_the_per_km_rate_for_an_existing_vehicle_capacity_type(self):
pass
digraph "classes_bqkjxxusnl" {
rankdir=BT
charset="utf-8"
"bqkjxxusnl.Admin" [color="black", fontcolor="black", label="{Admin|\l|approve_the_planned_mileage_modification_request_submitted_by_the_WarehouseIncharge()\ledit_the_eligibility_criteria_for_driver_incentive()\ledit_the_per_km_rate_for_an_existing_vehicle_capacity_type()\lmodify_the___drop_off___rate_table()\lmodify_the_minimum_fix_mileage_configuration_for_a_job()\lmodify_the_unloading_charge()\lset_up_the___drop_off___rate_table_based_on_number_of_outlets_visited()\lupdate_the_radius_limit_from_a_warehouse_for___drop_off___charges()\l}", shape="record", style="solid"];
"bqkjxxusnl.WarehouseIncharge" [color="black", fontcolor="black", label="{WarehouseIncharge|\l|approve_a_job()\lconfirm_the_delivered_items_to_a_outlet()\lrequest_a_modification_to_the_planned_mileage_of_a_job()\l}", shape="record", style="solid"];
"bqkjxxusnl.WarehouseOperator" [color="black", fontcolor="black", label="{WarehouseOperator|\l|allocate_a_vehicle_for_a_job()\lchange_the_system_suggested_optimized_route_if_required()\lchange_the_vehicle_allocated_for_a_job()\lconfirm_a_job()\lcreate_orders_by_uploading_a_CSV_file()\lexport_information_of_a_job_to_pdf_and_xls_format()\lgenerate_an_idle_time_limit_violation_report()\lgenerate_an_invoice_for_each_vehicle()\lgenerate_cost_per_1_kg_report()\lgenerate_outlet_wise_transport_cost_report_for_a_given_date_range()\lgenerate_vehicle_capacity_utilization_report()\lgenerate_vehicle_turnaround_time_report_for_a_warehouse()\lindicate_that_the_loading_is_completed()\lmake_adjustments_to_the_order()\l}", shape="record", style="solid"];
}
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph WarehouseOperator {label="WarehouseOperator"; warehouseoperator};
warehouseoperator [image="D:\SLIIT\Year 4\Research Project\2022-158\backend/stick.png";peripheries=0;];
subgraph WarehouseIncharge {label="WarehouseIncharge"; warehouseincharge};
warehouseincharge [image="D:\SLIIT\Year 4\Research Project\2022-158\backend/stick.png";peripheries=0;];
subgraph Admin {label="Admin"; admin};
admin [image="D:\SLIIT\Year 4\Research Project\2022-158\backend/stick.png";peripheries=0;];
node [shape=ellipse, style=solid];
sign_up_to_the_system [label="Sign Up To The System"];
sign_in_to_the_system [label="Sign In To The System"];
create_orders_by_uploading_a_csv_file [label="Create Orders By Uploading A Csv File"];
make_adjustments_to_the_order [label="Make Adjustments To The Order"];
allocate_a_vehicle_for_a_job [label="Allocate A Vehicle For A Job"];
change_the_system_suggested_optimized_route_if_required [label="Change The System Suggested Optimized Route If Required"];
confirm_a_job [label="Confirm A Job"];
change_the_vehicle_allocated_for_a_job [label="Change The Vehicle Allocated For A Job"];
export_information_of_a_job_to_pdf_and_xls_format [label="Export Information Of A Job To Pdf And Xls Format"];
indicate_that_the_loading_is_completed [label="Indicate That The Loading Is Completed"];
confirm_the_delivered_items_to_a_outlet [label="Confirm The Delivered Items To A Outlet"];
approve_a_job [label="Approve A Job"];
request_a_modification_to_the_planned_mileage_of_a_job [label="Request A Modification To The Planned Mileage Of A Job"];
approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge [label="Approve The Planned Mileage Modification Request Submitted By The Warehouseincharge"];
generate_an_invoice_for_each_vehicle [label="Generate An Invoice For Each Vehicle"];
modify_the_minimum_fix_mileage_configuration_for_a_job [label="Modify The Minimum Fix Mileage Configuration For A Job"];
modify_the_unloading_charge [label="Modify The Unloading Charge"];
update_the_radius_limit_from_a_warehouse_for___drop_off___charges [label="Update The Radius Limit From A Warehouse For Drop Off Charges"];
set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited [label="Set Up The Drop Off Rate Table Based On Number Of Outlets Visited"];
modify_the___drop_off___rate_table [label="Modify The Drop Off Rate Table"];
edit_the_eligibility_criteria_for_driver_incentive [label="Edit The Eligibility Criteria For Driver Incentive"];
edit_the_per_km_rate_for_an_existing_vehicle_capacity_type [label="Edit The Per Km Rate For An Existing Vehicle Capacity Type"];
generate_vehicle_capacity_utilization_report [label="Generate Vehicle Capacity Utilization Report"];
generate_outlet_wise_transport_cost_report_for_a_given_date_range [label="Generate Outlet Wise Transport Cost Report For A Given Date Range"];
generate_vehicle_turnaround_time_report_for_a_warehouse [label="Generate Vehicle Turnaround Time Report For A Warehouse"];
generate_cost_per_1_kg_report [label="Generate Cost Per 1 Kg Report"];
generate_an_idle_time_limit_violation_report [label="Generate An Idle Time Limit Violation Report"];
edge [arrowhead="none"];
user->sign_up_to_the_system;
user->sign_in_to_the_system;
warehouseoperator->create_orders_by_uploading_a_csv_file;
warehouseoperator->make_adjustments_to_the_order;
warehouseoperator->allocate_a_vehicle_for_a_job;
warehouseoperator->change_the_system_suggested_optimized_route_if_required;
warehouseoperator->confirm_a_job;
warehouseoperator->change_the_vehicle_allocated_for_a_job;
warehouseoperator->export_information_of_a_job_to_pdf_and_xls_format;
warehouseoperator->indicate_that_the_loading_is_completed;
warehouseincharge->confirm_the_delivered_items_to_a_outlet;
warehouseincharge->approve_a_job;
warehouseincharge->request_a_modification_to_the_planned_mileage_of_a_job;
admin->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
warehouseoperator->generate_an_invoice_for_each_vehicle;
admin->modify_the_minimum_fix_mileage_configuration_for_a_job;
admin->modify_the_unloading_charge;
admin->update_the_radius_limit_from_a_warehouse_for___drop_off___charges;
admin->set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited;
admin->modify_the___drop_off___rate_table;
admin->edit_the_eligibility_criteria_for_driver_incentive;
admin->edit_the_per_km_rate_for_an_existing_vehicle_capacity_type;
warehouseoperator->generate_vehicle_capacity_utilization_report;
warehouseoperator->generate_outlet_wise_transport_cost_report_for_a_given_date_range;
warehouseoperator->generate_vehicle_turnaround_time_report_for_a_warehouse;
warehouseoperator->generate_cost_per_1_kg_report;
warehouseoperator->generate_an_idle_time_limit_violation_report;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
create_orders_by_uploading_a_csv_file->make_adjustments_to_the_order;
confirm_a_job->change_the_vehicle_allocated_for_a_job_change_the_system_suggested_optimized_route_if_required;
edge [arrowtail="vee", label="<<include>>", style=dashed];
confirm_a_job->allocate_a_vehicle_for_a_job;
approve_a_job->confirm_the_delivered_items_to_a_outlet;
request_a_modification_to_the_planned_mileage_of_a_job->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
}
\ No newline at end of file
......@@ -119,7 +119,8 @@ abbr {
position: relative;
}
input::placeholder {
input::placeholder,
textarea::placeholder {
text-transform: uppercase;
font-size: 0.9rem !important;
letter-spacing: 2px;
......
......@@ -69,9 +69,15 @@
width: 100%;
box-sizing: border-box;
border: 2px solid var(--main-color-blue);
outline: none;
font-size: 1rem;
padding: 1rem;
color: #858585;
border-radius: 5px;
text-transform: uppercase;
font-size: 0.9rem !important;
letter-spacing: 2px;
font-weight: 550;
}
.rowpinfo select {
......
......@@ -191,7 +191,6 @@ textarea {
box-sizing: border-box;
border: 2px solid var(--main-color-blue);
border-radius: 4px;
background-color: #f8f8f8;
font-size: 16px;
font-family: "Inter", sans-serif;
resize: none;
......@@ -199,6 +198,4 @@ textarea {
textarea:focus {
outline: none !important;
box-shadow: 0 0 5px var(--main-color-blue);
border: 2px solid var(--main-color-blue);
}
import React from "react";
import "./Spinner.css";
import Spinner from "./Spinner";
const FullScreenLoader = ({ title }) => {
return (
<div className="full-screen-loader">
<Spinner title={title} />
</div>
);
};
export default FullScreenLoader;
.spinner-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 2rem;
}
.spinner {
width: 80px;
height: 80px;
......@@ -13,3 +16,13 @@
border-top-color: var(--main-color-blue);
animation: spin 1s linear infinite;
}
.full-screen-loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(255, 255, 255, 0.8);
z-index: 100;
}
......@@ -2,10 +2,11 @@ import React from "react";
import "./Spinner.css";
const Spinner = () => {
const Spinner = ({ title }) => {
return (
<div className="spinner-container">
<div className="spinner"></div>
<h2 style={{ paddingTop: "1rem" }}>{title}</h2>
</div>
);
};
......
......@@ -5,6 +5,7 @@ import { RiDeleteBinLine } from "react-icons/ri";
import { Link } from "react-router-dom";
import Sidebar from "../components/sidebar/Sidebar";
import FullScreenLoader from "../components/loading/FullScreenLoader";
import Spinner from "../components/loading/Spinner";
import Table from "../components/table/Table";
import TopNav from "../components/topnav/TopNav";
......@@ -15,6 +16,7 @@ const ManageAssignments = () => {
const [btnState, setBtnState] = useState(false);
const [error, setError] = useState("");
const [isLoading, setIsLoading] = useState(true);
const [isFullScreenLoading, setIsFullScreenLoading] = useState(false);
const [assignment, setAssignment] = useState({
content: "",
title: "",
......@@ -64,13 +66,13 @@ const ManageAssignments = () => {
const saveAssignment = async e => {
e.preventDefault();
setIsFullScreenLoading(true);
setBtnState(true);
console.log(assignment);
for (let key of Object.keys(assignment)) {
if (!assignment[key]) {
setBtnState(false);
setIsFullScreenLoading(false);
return setError("Please fill all the fields");
}
}
......@@ -90,9 +92,10 @@ const ManageAssignments = () => {
setError("");
window.alert("Assignment added successfully");
setBtnState(false);
setIsLoading(true);
setIsFullScreenLoading(false);
} catch (err) {
setBtnState(false);
setIsFullScreenLoading(false);
setError("Something went wrong");
console.log(err.response);
}
......@@ -144,6 +147,7 @@ const ManageAssignments = () => {
<div id="main" className="layout__content">
<TopNav />
<div className="layout__content-main">
{isFullScreenLoading && <FullScreenLoader title={"Generating Model Diagrams..."} />}
<h1 className="page-header">Manage Assignments</h1>
<div className="row">
<div className="col-12">
......@@ -176,7 +180,7 @@ const ManageAssignments = () => {
<GrammarlyEditorPlugin clientId="5c891c34-55b1-4504-b1a2-5215d35757ba">
<textarea
type="text"
placeholder="PASTE QUESTION SCENARIO HERE..."
placeholder="PASTE FORMATTED QUESTION SCENARIO HERE..."
value={assignment.content}
onChange={e =>
setAssignment({
......@@ -197,7 +201,6 @@ const ManageAssignments = () => {
id="position"
required
onChange={e => {
console.log(e.target.value);
setAssignment({
...assignment,
module_id: e.target.value,
......@@ -239,7 +242,6 @@ const ManageAssignments = () => {
type="datetime-local"
step={1}
placeholder="Starts At"
onFocus={"(this.type='datetime-local')"}
value={assignment.start_at}
onChange={e => {
let date = e.target.value.replace("T", " ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment