Commit 79d4d5bd authored by Jayasith H.B.C's avatar Jayasith H.B.C

Merge branch 'master' into 'IT19079264'

Master

See merge request !100
parents d7f1d9b1 704c5c1a
......@@ -8,6 +8,7 @@ class Assignment(db.Model):
module_id = db.Column(db.Integer, db.ForeignKey('module.id'))
content = db.Column(db.String(800), nullable=False)
plagiarism_percentage = db.Column(db.Integer, nullable=False)
assignment_type = db.Column(db.Integer, nullable=False)
start_at = db.Column(db.DateTime, default=datetime.now())
end_at = db.Column(db.DateTime)
created_at = db.Column(db.DateTime, default=datetime.now())
......
......@@ -10,6 +10,8 @@ class Relationship(db.Model):
y_min = db.Column(db.String(50), nullable=False)
x_max = db.Column(db.String(50), nullable=False)
y_max = db.Column(db.String(50), nullable=False)
comp_1 = db.Column(db.Integer, nullable=False)
comp_2 = db.Column(db.Integer, nullable=False)
def __repr__(self) -> str:
return 'class_relationship>>> {self.content}'
......@@ -5,8 +5,8 @@ from config.database import db
class Diagram(db.Model):
id = db.Column(db.Integer, primary_key=True)
assignment_id = db.Column(db.Integer, db.ForeignKey('assignment.id'))
class_diagram_path = db.Column(db.String(80), nullable=False)
usecase_diagram_path = db.Column(db.String(80), nullable=False)
class_diagram_path = db.Column(db.String(80))
usecase_diagram_path = db.Column(db.String(80))
created_at = db.Column(db.DateTime, default=datetime.now())
updated_at = db.Column(db.DateTime, onupdate=datetime.now(), default=datetime.now())
......
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
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
class Admin:
def login_to_the_system(self):
pass
def view_and_manage_cart_items(self):
pass
def check_the_payments_and_sold_items(self):
pass
def reply_to_Customer_feedbacks(self):
pass
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
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
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
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
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
class Admin:
def login_to_the_system(self):
pass
def view_and_manage_cart_items(self):
pass
def check_the_payments_and_sold_items(self):
pass
def reply_to_Customer_feedbacks(self):
pass
digraph "classes_aurpgjevor" {
rankdir=BT
charset="utf-8"
"aurpgjevor.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"];
"aurpgjevor.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"];
"aurpgjevor.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 "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 "classes_jreuxvujyx" {
rankdir=BT
charset="utf-8"
"jreuxvujyx.Admin" [color="black", fontcolor="black", label="{Admin|\l|check_the_payments_and_sold_items()\llogin_to_the_system()\lreply_to_Customer_feedbacks()\lview_and_manage_cart_items()\l}", shape="record", style="solid"];
}
digraph "classes_okovnrmokc" {
rankdir=BT
charset="utf-8"
"okovnrmokc.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"];
"okovnrmokc.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"];
"okovnrmokc.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 "classes_tefqjbwtro" {
rankdir=BT
charset="utf-8"
"tefqjbwtro.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_Minimum_Fix_Mileage_Configuration_For_A_Job()\lModify_The_Unloading_Charge()\lModify_The___Drop_Off___Rate_Table()\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"];
"tefqjbwtro.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"];
"tefqjbwtro.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 "classes_wwebavcyfa" {
rankdir=BT
charset="utf-8"
"wwebavcyfa.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_Minimum_Fix_Mileage_Configuration_For_A_Job()\lModify_The_Unloading_Charge()\lModify_The___Drop_Off___Rate_Table()\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"];
"wwebavcyfa.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"];
"wwebavcyfa.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 "classes_xjhuiklcyw" {
rankdir=BT
charset="utf-8"
"xjhuiklcyw.Admin" [color="black", fontcolor="black", label="{Admin|\l|check_the_payments_and_sold_items()\llogin_to_the_system()\lreply_to_Customer_feedbacks()\lview_and_manage_cart_items()\l}", shape="record", style="solid"];
}
digraph "classes_ywgbkhhsvd" {
rankdir=BT
charset="utf-8"
"ywgbkhhsvd.Admin" [color="black", fontcolor="black", label="{Admin|\l|check_the_payments_and_sold_items()\llogin_to_the_system()\lreply_to_Customer_feedbacks()\lview_and_manage_cart_items()\l}", shape="record", style="solid"];
}
digraph "classes_zmvecfvrja" {
rankdir=BT
charset="utf-8"
"zmvecfvrja.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"];
"zmvecfvrja.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"];
"zmvecfvrja.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"];
}
......@@ -6,13 +6,13 @@ digraph G {
node [shape=plaintext]
subgraph WarehouseOperator {label="WarehouseOperator"; warehouseoperator};
warehouseoperator [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
warehouseoperator [image="D:\SLIIT\Year 4\Research Project\2022-158\backend/stick.png";peripheries=0;];
subgraph WarehouseIncharge {label="WarehouseIncharge"; warehouseincharge};
warehouseincharge [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
warehouseincharge [image="D:\SLIIT\Year 4\Research Project\2022-158\backend/stick.png";peripheries=0;];
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
admin [image="D:\SLIIT\Year 4\Research Project\2022-158\backend/stick.png";peripheries=0;];
node [shape=ellipse, style=solid];
......@@ -46,8 +46,8 @@ digraph G {
edge [arrowhead="none"];
user->sign_up_to_the_system;
user->sign_in_to_the_system;
theuser->sign_up_to_the_system;
theuser->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;
......
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
node [shape=ellipse, style=solid];
login_to_the_system [label="Login To The System"];
check_the_home_page [label="Check The Home Page"];
play_the_site_demo_video [label="Play The Site Demo Video"];
add_items_to_the_cart [label="Add Items To The Cart"];
pay_the_items [label="Pay The Items"];
give_a_feedback_for_the_system [label="Give A Feedback For The System"];
view_the_seller_details [label="View The Seller Details"];
contact_the_seller_to_request_more_items [label="Contact The Seller To Request More Items"];
login_to_the_system [label="Login To The System"];
view_and_manage_cart_items [label="View And Manage Cart Items"];
check_the_payments_and_sold_items [label="Check The Payments And Sold Items"];
reply_to_customer_feedbacks [label="Reply To Customer Feedbacks"];
edge [arrowhead="none"];
customer->login_to_the_system;
customer->check_the_home_page;
customer->play_the_site_demo_video;
customer->add_items_to_the_cart;
customer->pay_the_items;
customer->give_a_feedback_for_the_system;
customer->view_the_seller_details;
customer->contact_the_seller_to_request_more_items;
admin->login_to_the_system;
admin->view_and_manage_cart_items;
admin->check_the_payments_and_sold_items;
admin->reply_to_customer_feedbacks;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
give_a_feedback_for_the_system->rate_the_service;
edge [arrowtail="vee", label="<<include>>", style=dashed];
pay_the_items->recieve_the_confirmation_email;
}
\ No newline at end of file
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
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];
login_to_the_system [label="Login To The System"];
check_the_home_page [label="Check The Home Page"];
play_the_site_demo_video [label="Play The Site Demo Video"];
add_items_to_the_cart [label="Add Items To The Cart"];
pay_the_items [label="Pay The Items"];
give_a_feedback_for_the_system [label="Give A Feedback For The System"];
view_the_seller_details [label="View The Seller Details"];
contact_the_seller_to_request_more_items [label="Contact The Seller To Request More Items"];
login_to_the_system [label="Login To The System"];
view_and_manage_cart_items [label="View And Manage Cart Items"];
check_the_payments_and_sold_items [label="Check The Payments And Sold Items"];
reply_to_customer_feedbacks [label="Reply To Customer Feedbacks"];
edge [arrowhead="none"];
customer->login_to_the_system;
customer->check_the_home_page;
customer->play_the_site_demo_video;
customer->add_items_to_the_cart;
customer->pay_the_items;
customer->give_a_feedback_for_the_system;
customer->view_the_seller_details;
customer->contact_the_seller_to_request_more_items;
admin->login_to_the_system;
admin->view_and_manage_cart_items;
admin->check_the_payments_and_sold_items;
admin->reply_to_customer_feedbacks;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
give_a_feedback_for_the_system->rate_the_service;
edge [arrowtail="vee", label="<<include>>", style=dashed];
pay_the_items->recieve_the_confirmation_email;
}
\ No newline at end of file
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph WarehouseOperator {label="WarehouseOperator"; warehouseoperator};
warehouseoperator [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
subgraph WarehouseIncharge {label="WarehouseIncharge"; warehouseincharge};
warehouseincharge [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\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
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
node [shape=ellipse, style=solid];
login_to_the_system [label="Login To The System"];
check_the_home_page [label="Check The Home Page"];
play_the_site_demo_video [label="Play The Site Demo Video"];
add_items_to_the_cart [label="Add Items To The Cart"];
pay_the_items [label="Pay The Items"];
give_a_feedback_for_the_system [label="Give A Feedback For The System"];
view_the_seller_details [label="View The Seller Details"];
contact_the_seller_to_request_more_items [label="Contact The Seller To Request More Items"];
login_to_the_system [label="Login To The System"];
view_and_manage_cart_items [label="View And Manage Cart Items"];
check_the_payments_and_sold_items [label="Check The Payments And Sold Items"];
reply_to_customer_feedbacks [label="Reply To Customer Feedbacks"];
edge [arrowhead="none"];
customer->login_to_the_system;
customer->check_the_home_page;
customer->play_the_site_demo_video;
customer->add_items_to_the_cart;
customer->pay_the_items;
customer->give_a_feedback_for_the_system;
customer->view_the_seller_details;
customer->contact_the_seller_to_request_more_items;
admin->login_to_the_system;
admin->view_and_manage_cart_items;
admin->check_the_payments_and_sold_items;
admin->reply_to_customer_feedbacks;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
give_a_feedback_for_the_system->rate_the_service;
edge [arrowtail="vee", label="<<include>>", style=dashed];
pay_the_items->recieve_the_confirmation_email;
}
\ No newline at end of file
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph WarehouseOperator {label="WarehouseOperator"; warehouseoperator};
warehouseoperator [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
subgraph WarehouseIncharge {label="WarehouseIncharge"; warehouseincharge};
warehouseincharge [image="D:\Nanduni.Bsc\research_code\2022-158\backend/stick.png";peripheries=0;];
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\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
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"];
theuser->sign_up_to_the_system;
theuser->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
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
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];
login_to_the_system [label="Login To The System"];
check_the_home_page [label="Check The Home Page"];
play_the_site_demo_video [label="Play The Site Demo Video"];
add_items_to_the_cart [label="Add Items To The Cart"];
pay_the_items [label="Pay The Items"];
give_a_feedback_for_the_system [label="Give A Feedback For The System"];
view_the_seller_details [label="View The Seller Details"];
contact_the_seller_to_request_more_items [label="Contact The Seller To Request More Items"];
login_to_the_system [label="Login To The System"];
view_and_manage_cart_items [label="View And Manage Cart Items"];
check_the_payments_and_sold_items [label="Check The Payments And Sold Items"];
reply_to_customer_feedbacks [label="Reply To Customer Feedbacks"];
edge [arrowhead="none"];
customer->login_to_the_system;
customer->check_the_home_page;
customer->play_the_site_demo_video;
customer->add_items_to_the_cart;
customer->pay_the_items;
customer->give_a_feedback_for_the_system;
customer->view_the_seller_details;
customer->contact_the_seller_to_request_more_items;
admin->login_to_the_system;
admin->view_and_manage_cart_items;
admin->check_the_payments_and_sold_items;
admin->reply_to_customer_feedbacks;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
give_a_feedback_for_the_system->rate_the_service;
edge [arrowtail="vee", label="<<include>>", style=dashed];
pay_the_items->recieve_the_confirmation_email;
}
\ No newline at end of file
......@@ -15,6 +15,7 @@ def create_assignment():
title = request.json.get('title', '')
content = request.json.get('content', '')
module_id = request.json.get('module_id', '')
assignment_type = request.json.get('assignment_type', '')
plagiarism_percentage = request.json.get('plagiarism_percentage', '')
start_at = datetime.strptime(request.json.get('start_at', ''), '%Y-%m-%d %H:%M:%S')
end_at = datetime.strptime(request.json.get('end_at', ''), '%Y-%m-%d %H:%M:%S')
......@@ -25,19 +26,22 @@ def create_assignment():
assignment_obj = Assignment(title=title, content=content,
module_id=module_id,
plagiarism_percentage=plagiarism_percentage,
assignment_type=assignment_type,
start_at=start_at,
end_at=end_at)
db.session.add(assignment_obj)
db.session.commit()
response = requests.post(url="http://127.0.0.1:5000/api/v1/diagrams/generate",
json={"scenario": content, "assignment_id": assignment_obj.id})
json={"scenario": content, "assignment_id": assignment_obj.id, "assignment_type": assignment_obj.assignment_type})
print(response.content)
if response.ok:
return jsonify({'msg': 'Assignment created', 'assignment': {
'id': assignment_obj.id,
'title': assignment_obj.title,
'content': assignment_obj.content,
'assignment_type': assignment_obj.assignment_type,
'module_id': assignment_obj.module_id,
'plagiarism_percentage': assignment_obj.plagiarism_percentage,
'start_at': assignment_obj.start_at,
......@@ -58,7 +62,7 @@ def get_assignments():
for assignment, module in assignment_obj:
assignments.append(
{"id": assignment.id, "title": assignment.title, "module_id": assignment.module_id, "code": module.code, "name": module.name, "start_at": assignment.start_at, "end_at": assignment.end_at,
{"id": assignment.id, "title": assignment.title, "module_id": assignment.module_id, "code": module.code, "name": module.name, "start_at": assignment.start_at, "end_at": assignment.end_at, 'assignment_type': assignment.assignment_type,
"created_at": assignment.created_at, "updated_at": assignment.updated_at})
if assignment_obj is None:
......@@ -81,6 +85,7 @@ def get_assignment(assignment_id):
'id': assignment_obj.id,
"title": assignment_obj.title,
'content': assignment_obj.content,
'assignment_type': assignment_obj.assignment_type,
'module_id': assignment_obj.module_id,
'plagiarism_percentage': assignment_obj.plagiarism_percentage,
'start_at': assignment_obj.start_at,
......@@ -105,6 +110,7 @@ def delete_assignment(assignment_id):
'id': assignment_obj.id,
"title": assignment_obj.title,
'content': assignment_obj.content,
'assignment_type': assignment_obj.assignment_type,
'module_id': assignment_obj.module_id,
'plagiarism_percentage': assignment_obj.plagiarism_percentage,
'start_at': assignment_obj.start_at,
......@@ -117,6 +123,7 @@ def update_assignment(assignment_id):
content = request.json.get('content', '')
title = request.json.get('title', '')
module_id = request.json.get('module_id', '')
assignment_type = request.json.get('assignment_type', '')
plagiarism_percentage = request.json.get('plagiarism_percentage', '')
start_at = datetime.strptime(request.json.get('start_at', ''), '%Y-%m-%d %H:%M:%S')
end_at = datetime.strptime(request.json.get('end_at', ''), '%Y-%m-%d %H:%M:%S')
......@@ -130,12 +137,14 @@ def update_assignment(assignment_id):
assignment_obj.plagiarism_percentage = plagiarism_percentage
assignment_obj.start_at = start_at
assignment_obj.end_at = end_at
assignment_obj.assignment_type = assignment_type
db.session.commit()
return jsonify({'msg': 'Assignment updated', 'assignment': {
'id': assignment_obj.id,
"title": assignment_obj.title,
'content': assignment_obj.content,
'assignment_type': assignment_obj.assignment_type,
'module_id': assignment_obj.module_id,
'plagiarism_percentage': assignment_obj.plagiarism_percentage,
'start_at': assignment_obj.start_at,
......
......@@ -12,26 +12,53 @@ diagram = Blueprint('diagrams', __name__, url_prefix='/api/v1/diagrams')
@diagram.post('/generate')
def generate_diagrams():
try:
generated_usecase_diagram_path = None
generated_class_diagram_path = None
data = request.get_json(silent=True)
if data is None:
return jsonify('Please attach assignment details'), HTTP_400_BAD_REQUEST
generated_class_diagram_path, generated_usecase_diagram_path = services.question_preprocess_service.main(
data['scenario'])
if generated_usecase_diagram_path or generated_usecase_diagram_path:
if data['assignment_type'] == 1:
generated_usecase_diagram_path = services.question_preprocess_service.main(
data['scenario'], data['assignment_type'])
diagram_obj = Diagram(assignment_id=data['assignment_id'],
usecase_diagram_path=generated_usecase_diagram_path,
class_diagram_path=None)
elif data['assignment_type'] == 2:
generated_class_diagram_path = services.question_preprocess_service.main(
data['scenario'], data['assignment_type'])
diagram_obj = Diagram(assignment_id=data['assignment_id'],
usecase_diagram_path=None,
class_diagram_path=generated_class_diagram_path)
db.session.add(diagram_obj)
db.session.commit()
elif data['assignment_type'] == 3:
print(data['assignment_type'])
generated_class_diagram_path, generated_usecase_diagram_path = services.question_preprocess_service.main(
data['scenario'], data['assignment_type'])
diagram_obj = Diagram(assignment_id=data['assignment_id'],
usecase_diagram_path=generated_usecase_diagram_path,
class_diagram_path=generated_class_diagram_path)
else:
return jsonify('Something went wrong'), HTTP_500_INTERNAL_SERVER_ERROR
return jsonify(generated_class_diagram_path=generated_class_diagram_path,
generated_usecase_diagram_path=generated_usecase_diagram_path), HTTP_200_OK
db.session.add(diagram_obj)
db.session.commit()
if data['assignment_type'] == 1:
return jsonify(
generated_usecase_diagram_path=generated_usecase_diagram_path), HTTP_200_OK
elif data['assignment_type'] == 2:
return jsonify(generated_class_diagram_path=generated_class_diagram_path,
), HTTP_200_OK
elif data['assignment_type'] == 3:
return jsonify(generated_class_diagram_path=generated_class_diagram_path,
generated_usecase_diagram_path=generated_usecase_diagram_path), HTTP_200_OK
else:
return jsonify('Something went wrong'), HTTP_500_INTERNAL_SERVER_ERROR
except Exception or BadRequestKeyError:
if BadRequestKeyError:
......@@ -46,4 +73,5 @@ def get_diagrams(assignment_id):
if diagram_obj is None:
return jsonify({"err": "No diagram found"}, HTTP_404_NOT_FOUND)
return jsonify({'msg': 'Diagrams found', 'diagrams': {'class_diagram': diagram_obj.class_diagram_path, 'usecase_diagram': diagram_obj.usecase_diagram_path}}), HTTP_200_OK
return jsonify({'msg': 'Diagrams found', 'diagrams': {'class_diagram': diagram_obj.class_diagram_path,
'usecase_diagram': diagram_obj.usecase_diagram_path}}), HTTP_200_OK
......@@ -4,7 +4,6 @@ import numpy as np
import pytesseract as ts
from PIL import Image
from models.attribute_model import Attribute
from paddleocr import PaddleOCR, draw_ocr # main OCR dependencies
from object_detection.utils import label_map_util
import matplotlib.pyplot as plt
import app
......@@ -16,6 +15,7 @@ from models.class_component_model import Component
from models.class_relationship_model import Relationship
from models.class_relationship_muplicity import Multiplicity
from models.method_model import Method
from services.class_relationship_relativity_service import detect_class_relationship
ts.pytesseract.tesseract_cmd = r'C:\Users\DELL\AppData\Local\Programs\Tesseract-OCR\tesseract.exe'
......@@ -38,20 +38,21 @@ def component_separation(filename, class_comp_id):
elif len(accurate_indexes) == 1:
category = category_index[class_id]['name']
print(category)
# print(category)
# select the component type and provide method to detect further details
if category == 'class':
print(filename, 'class')
# print(filename, 'class')
class_details_detection(image_nparray, boxes, index, class_comp_id, category)
elif category == 'interface':
print(filename, 'interface')
# print(filename, 'interface')
class_details_detection(image_nparray, boxes, index, class_comp_id, category)
else:
print(filename, 'relationship')
relationship_details_detection(image_nparray, boxes, index, class_comp_id, category)
# print(filename, 'relationship')
detect_class_relationship(image_nparray, boxes, index, class_comp_id, category)
# relationship_details_detection(image_nparray, boxes, index, class_comp_id, category)
def class_object_detection(model_path, label_path, image_nparray):
......@@ -82,7 +83,7 @@ def class_details_detection(image_nparray, boxes, index, class_comp_id, class_ty
methods_attributes = []
_image, cl_ymin, cl_xmin, cl_ymax, cl_xmax = crop_image_(image_nparray, boxes, index)
cv2.imwrite('image_1.jpg', _image)
# cv2.imwrite('image_1.jpg', _image)
mdl2_path = app.CLASS_COMP_SAVED_MODEL_PATH
lbl2_path = app.CLASS_COMP_SAVED_LABEL_PATH
......@@ -95,30 +96,30 @@ def class_details_detection(image_nparray, boxes, index, class_comp_id, class_ty
else:
category = category_index[class_id]['name']
print(category)
# print(category)
if category == 'class_attributes':
print(category, 'line 96 - inside attributes')
# print(category, 'line 96 - inside attributes')
class_attributes, y_min, x_min, y_max, x_max = crop_image_(_image, boxes_class, j)
class_attributes = cv2.resize(class_attributes, None, fx=2, fy=2)
cv2.imwrite('image.jpg', class_attributes)
# cv2.imwrite('image.jpg', class_attributes)
text = text_extraction(class_attributes)
attr = save_attributes_methods(text, 'attribute')
methods_attributes.append(attr)
elif category == 'class_methods':
print(category, 'line 103 - inside methods')
# print(category, 'line 103 - inside methods')
class_methods, y_min, x_min, y_max, x_max = crop_image_(_image, boxes_class, j)
class_methods = cv2.resize(class_methods, None, fx=2, fy=2)
text = text_extraction(class_methods)
methods = save_attributes_methods(text, 'method')
methods_attributes.append(methods)
print(text, '111 line')
# print(text, '111 line')
comp_name = class_name_detection(_image, boxes_class, category_index, accurate_indexes, class_id)
print(comp_name, 'comp_name line 118')
# print(comp_name, 'comp_name line 118')
comp = save_class_interface(class_type, comp_name, cl_ymin, cl_xmin, cl_ymax, cl_xmax, class_comp_id)
print(comp, 'component_id line 120')
# print(comp, 'component_id line 120')
alter_attributes_methods(methods_attributes, comp.id)
......@@ -154,7 +155,7 @@ def save_attributes_methods(text, typ):
saved_data = []
nlp = spacy.load('en_core_web_sm')
for element in text:
print(element, 'line 145')
# print(element, 'line 145')
# removable = str.maketrans('', '', '()')
nlp_ner = spacy.load('ner_models/model-best')
nlp_output = nlp_ner(element)
......@@ -184,13 +185,13 @@ def save_attributes_methods(text, typ):
method.return_type = token.text
if typ == 'attribute':
print(attr, 'line 175 - attr')
# print(attr, 'line 175 - attr')
db.session.add(attr)
db.session.commit()
saved_data.append(attr)
else:
print(method, 'line 181 method')
# print(method, 'line 181 method')
db.session.add(method)
db.session.commit()
saved_data.append(method)
......@@ -202,8 +203,8 @@ def save_attributes_methods(text, typ):
def alter_attributes_methods(element_list, component_id):
for j in element_list:
for element in j:
print(component_id)
print(element_list)
# print(component_id)
# print(element_list)
element.class_id = component_id
db.session.commit()
......@@ -227,35 +228,35 @@ def covert_to_access_specifier(access):
def class_name_detection(image, boxes, category_index, accurate_indexes, class_id):
print(category_index, 'category_index')
# print(category_index, 'category_index')
print(class_id, 'class_id')
# print(class_id, 'class_id')
height, width, c = image.shape
for i in range(0, len(accurate_indexes)):
if len(accurate_indexes) > 1:
category = category_index[class_id[i]]['name']
print(category, '225 line')
# print(category, '225 line')
else:
category = category_index[class_id]['name']
print(category, '225 line')
# print(category, '225 line')
if category is not 'interface_name' or category is not 'class_name':
if category != 'interface_name' or category != 'class_name':
ymin = boxes[i][0] * height
xmin = boxes[i][1] * width
ymax = boxes[i][2] * height
xmax = boxes[i][3] * width
cv2.rectangle(image, (int(xmin), int(ymin)), (int(xmax), int(ymax)), (255, 255, 255), -1)
cv2.imwrite('image_2.jpg', image)
# cv2.imwrite('image_2.jpg', image)
class_name = text_extraction(image)
print(class_name, 'line 249 class name')
# print(class_name, 'line 249 class name')
if ''.join(class_name) is not None:
print(class_name, 'line 251 class name')
if "terface" in ''.join(class_name):
# print(class_name, 'line 251 class name')
if "interface" in ''.join(class_name):
name = ''.join(class_name).replace("<<interface>>", "")
else:
name = ''.join(class_name)
......@@ -269,59 +270,5 @@ def save_class_interface(class_type, comp_name, cl_ymin, cl_xmin, cl_ymax, cl_xm
y_max=cl_ymax)
db.session.add(comp)
db.session.commit()
print(comp, 'line 261 comp')
# print(comp, 'line 261 comp')
return comp
def relationship_details_detection(image_nparray, boxes, index, class_comp_id, category):
_image, y_min, x_min, y_max, x_max = crop_image_(image_nparray, boxes, index)
_image = cv2.resize(_image, None, fx=3, fy=5)
ocr_model = PaddleOCR(lang='en', use_gpu=False)
result = ocr_model.ocr(_image)
relationship = Relationship(class_answer=class_comp_id, type=category, x_min=x_min, y_min=y_min,
x_max=x_max,
y_max=y_max)
db.session.add(relationship)
db.session.commit()
if result is not None:
relationship_text(_image, result, relationship)
print(relationship, 'relationship')
def relationship_text(_image, result, relationship):
# boxes = [res[0] for res in result]
# texts = [res[1][0] for res in result]
# scores = [res[1][1] for res in result]
for element in result:
text = element[1][0]
box = element[0]
nlp_ner = spacy.load('ner_models/model-best')
nlp_output = nlp_ner(text)
print(text, 'line 290')
# box = np.array(box,dtype=float)
box = np.array(box).astype(np.int32)
xmin = min(box[:, 0])
ymin = min(box[:, 1])
xmax = max(box[:, 0])
ymax = max(box[:, 1])
for token in nlp_output.ents:
print(token, 'line 301')
print(token.label_, 'line 302')
if token.label_ == 'MULTIPLICITY' or contains_number(text):
multiplicity = Multiplicity(value=token.text, relationship_id=relationship.id, x_min=xmin,
y_min=ymin, x_max=xmax, y_max=ymax)
db.session.add(multiplicity)
db.session.commit()
if not contains_number(text):
relationship.name = text
db.session.commit()
# check if string contains any numbers
def contains_number(string):
return any([char.isdigit() for char in string])
import math
from decimal import Decimal
import cv2
import keras_ocr
import numpy as np
import spacy
from paddleocr import PaddleOCR, draw_ocr # main OCR dependencies
from config.database import db
import app
from models.class_component_model import Component
from models.class_relationship_model import Relationship
from models.class_relationship_muplicity import Multiplicity
def detect_class_relationship(image_nparray, boxes, index, class_comp_id, category):
# image = cv2.imread(app.SUBMISSION_PATH + '/' + filename)
height, width, c = image_nparray.shape
class_objects = Component.query.filter_by(class_answer=class_comp_id).all()
# for i in range(0, len(accurate_indexes))
# if category_index[class_id[i]]['name'] != 'class' and category_index[class_id[i]]['name'] != 'interface':
# category_name = category_index[class_id[i]]['name']
ymin = boxes[index][0] * height
xmin = boxes[index][1] * width
ymax = boxes[index][2] * height
xmax = boxes[index][3] * width
crop_img = image_nparray[int(ymin):int(ymax), int(xmin):int(xmax)]
img = remove_text(crop_img)
if category == 'realization':
img = line_recovery(img)
gray_image = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
_, thresh_image = cv2.threshold(gray_image, 100, 255, cv2.THRESH_BINARY_INV)
arrow_image = get_filter_arrow_image(thresh_image)
if arrow_image is not None:
arrow_info_image, point1, point2 = get_arrow_info(arrow_image)
point1_x = int(xmin) + point1[0]
point1_y = int(ymin) + point1[1]
point2_x = int(xmin) + point2[0]
point2_y = int(ymin) + point2[1]
line_point1 = (point1_x, point1_y)
line_point2 = (point2_x, point2_y)
class_object1 = find_closest_components_length(line_point1, class_objects)
class_object2 = find_closest_components_length(line_point2, class_objects)
relationship_details_detection(image_nparray, boxes, index, class_comp_id, category, class_object1,
class_object2)
def midpoint(x1, y1, x2, y2):
x_mid = int((x1 + x2) / 2)
y_mid = int((y1 + y2) / 2)
return (x_mid, y_mid)
def remove_text(img_path):
# read image
pipeline = keras_ocr.pipeline.Pipeline()
img = keras_ocr.tools.read(img_path)
# generate (word, box) tuples
prediction_groups = pipeline.recognize([img])
mask = np.zeros(img.shape[:2], dtype="uint8")
for box in prediction_groups[0]:
x0, y0 = box[1][0]
x1, y1 = box[1][1]
x2, y2 = box[1][2]
x3, y3 = box[1][3]
x_mid0, y_mid0 = midpoint(x1, y1, x2, y2)
x_mid1, y_mi1 = midpoint(x0, y0, x3, y3)
thickness = int(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))
cv2.line(mask, (x_mid0, y_mid0), (x_mid1, y_mi1), 255,
thickness)
img = cv2.inpaint(img, mask, 7, cv2.INPAINT_NS)
return img
def line_recovery(img):
kernel1 = np.ones((3, 5), np.uint8)
kernel2 = np.ones((9, 9), np.uint8)
imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
imgBW = cv2.threshold(imgGray, 230, 255, cv2.THRESH_BINARY_INV)[1]
img1 = cv2.erode(imgBW, kernel1, iterations=1)
img2 = cv2.dilate(img1, kernel2, iterations=3)
img3 = cv2.bitwise_and(imgBW, img2)
img3 = cv2.bitwise_not(img3)
img4 = cv2.bitwise_and(imgBW, imgBW, mask=img3)
imgLines = cv2.HoughLinesP(img4, 1, np.pi / 180, 20, minLineLength=0, maxLineGap=10)
for i in range(len(imgLines)):
for x1, y1, x2, y2 in imgLines[i]:
cv2.line(img, (x1, y1), (x2, y2), (0, 0, 0), 2)
return img
def get_filter_arrow_image(threslold_image):
blank_image = np.zeros_like(threslold_image)
kernel_dilate = cv2.getStructuringElement(cv2.MORPH_RECT, (2, 2))
threslold_image = cv2.dilate(threslold_image, kernel_dilate, iterations=1)
contours, hierarchy = cv2.findContours(threslold_image, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
if hierarchy is not None:
threshold_distnace = 100
for cnt in contours:
hull = cv2.convexHull(cnt, returnPoints=False)
defects = cv2.convexityDefects(cnt, hull)
if defects is not None:
for i in range(defects.shape[0]):
start_index, end_index, farthest_index, distance = defects[i, 0]
if distance > threshold_distnace:
cv2.drawContours(blank_image, [cnt], -1, 225, -1)
return blank_image
else:
return None
def get_length(p1, p2):
line_length = ((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2) ** 0.5
return line_length
def find_max_length(contours):
max_lenth = 0
for cnt in contours:
p1, p2 = get_max_distace_point(cnt)
line_length = ((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2) ** 0.5
if line_length > max_lenth:
max_lenth = line_length
return max_lenth
def get_max_distace_point(cnt):
max_distance = 0
max_points = None
for [[x1, y1]] in cnt:
for [[x2, y2]] in cnt:
distance = get_length((x1, y1), (x2, y2))
if distance > max_distance:
max_distance = distance
max_points = [(x1, y1), (x2, y2)]
return max_points
def angle_between_points(a, b):
arrow_slope = (a[0] - b[0]) / (a[1] - b[1])
arrow_angle = math.degrees(math.atan(arrow_slope))
return arrow_angle
def get_arrow_info(arrow_image):
arrow_info_image = cv2.cvtColor(arrow_image.copy(), cv2.COLOR_GRAY2BGR)
contours, hierarchy = cv2.findContours(arrow_image, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
if hierarchy is not None:
max_lenth = find_max_length(contours)
for cnt in contours:
blank_image = np.zeros_like(arrow_image)
cv2.drawContours(blank_image, [cnt], -1, 255, -1)
point1, point2 = get_max_distace_point(cnt)
lenght = get_length(point1, point2)
if lenght == max_lenth:
cv2.circle(arrow_info_image, point1, 2, (255, 0, 0), 3)
cv2.circle(arrow_info_image, point2, 2, (255, 0, 0), 3)
cv2.putText(arrow_info_image, "point 1 : %s" % (str(point1)), point2, cv2.FONT_HERSHEY_PLAIN, 0.8,
(0, 0, 255), 1)
cv2.putText(arrow_info_image, "point 2 : %s" % (str(point2)), (point2[0], point2[1] + 20),
cv2.FONT_HERSHEY_PLAIN, 0.8, (0, 0, 255), 1)
return arrow_info_image, point1, point2
else:
return None, None
def find_closest_components_length(point, class_objects):
u_object = 0
min_length = 1000000000000
for obj in class_objects:
ymin = Decimal(obj.y_min)
xmin = Decimal(obj.x_min)
ymax = Decimal(obj.y_max)
xmax = Decimal(obj.x_max)
usecase_x = xmin + (xmax - xmin) / 2
usecase_y = ymin + (ymax - ymin) / 2
usecase_point = (int(usecase_x), int(usecase_y))
l_length = ((point[0] - usecase_point[0]) ** 2 + (point[1] - usecase_point[1]) ** 2) ** 0.5
if min_length > l_length:
min_length = l_length
u_object = obj
return u_object
def relationship_details_detection(image_nparray, boxes, index, class_comp_id, category, class_object1, class_object2):
_image, y_min, x_min, y_max, x_max = crop_image_(image_nparray, boxes, index)
_image = cv2.resize(_image, None, fx=4, fy=5)
ocr_model = PaddleOCR(lang='en', use_gpu=False)
result = ocr_model.ocr(_image)
relationship = Relationship(class_answer=class_comp_id, type=category, x_min=x_min, y_min=y_min,
x_max=x_max,
y_max=y_max, comp_1=class_object1.id, comp_2=class_object2.id)
db.session.add(relationship)
db.session.commit()
if result is not None:
relationship_text(_image, result, relationship)
# print(relationship, 'relationship')
def relationship_text(_image, result, relationship):
# boxes = [res[0] for res in result]
# texts = [res[1][0] for res in result]
# scores = [res[1][1] for res in result]
for element in result:
text = element[1][0]
box = element[0]
nlp_ner = spacy.load('ner_models/model-best')
nlp_output = nlp_ner(text)
# print(text, 'line 290')
# box = np.array(box,dtype=float)
box = np.array(box).astype(np.int32)
xmin = min(box[:, 0])
ymin = min(box[:, 1])
xmax = max(box[:, 0])
ymax = max(box[:, 1])
for token in nlp_output.ents:
# print(token.text, 'line 301')
# print(token.label_, 'line 302')
if token.label_ == 'MULTIPLICITY' or contains_number(text):
multiplicity = Multiplicity(value=token.text, relationship_id=relationship.id, x_min=xmin,
y_min=ymin, x_max=xmax, y_max=ymax)
db.session.add(multiplicity)
db.session.commit()
if not contains_number(text):
relationship.name = text
db.session.commit()
# check if string contains any numbers
def contains_number(string):
return any([char.isdigit() for char in string])
# crop image using boxes & index
def crop_image_(image, boxes, index):
height, width, c = image.shape
# crop box format: xmin, ymin, xmax, ymax
ymin = boxes[index][0] * height
xmin = boxes[index][1] * width
ymax = boxes[index][2] * height
xmax = boxes[index][3] * width
cropped_image = image[int(ymin):int(ymax), int(xmin):int(xmax)]
# image = cv2.cvtColor(cropped_image, cv2.COLOR_BGR2GRAY)
# image = cv2.resize(image, (800, 500))
# returns cropped image , ymin,xmin,ymax & xmax
return cropped_image, ymin, xmin, ymax, xmax
......@@ -23,17 +23,20 @@ def remove_punctuation(sentence):
return cleaned_sentence
# load the text
def main(scenario):
requirement_text = scenario.replace("\n\n", " ").replace("\n", " ")
# load the text content and generating diagrams
def main(scenario, assignment_type):
# replacing spaces and new line characters
text_content = scenario.replace("\n\n", " ").replace("\n", " ")
nlp = spacy.load("en_core_web_lg")
doc = nlp(requirement_text)
nlp_loaded_text_content = nlp(text_content)
# sentence splitting
sentences = list(doc.sents)
# sentences splitting
sentences = list(nlp_loaded_text_content.sents)
# removing fist and last sentences
sentences.pop(0)
del sentences[-1]
# creating required lists
nc = []
cleaned_extracted_actions = []
cleaned_sentences = []
......@@ -41,7 +44,7 @@ def main(scenario):
# looping through each sentence
for sentence in sentences:
res = get_nouns_pnouns(sentence)
res = get_nouns_pronouns(sentence)
nc.append(str(res))
cleaned_sentence = remove_punctuation(sentence)
cleaned_sentences.append(cleaned_sentence)
......@@ -57,10 +60,21 @@ def main(scenario):
# remove duplicates of the actors
nc = list(dict.fromkeys(nc))
data = remove_unwanted_values(nc)
generated_class_diagram_path = generate_class(data, cleaned_extracted_actions)
extracted_relationships = get_include_extend_relationships(splitted_actions_array)
actors_and_use_cases_array = identify_use_cases(cleaned_extracted_actions)
generated_usecase_diagram_path = generate_use_case_diagram(data, extracted_relationships,
actors_and_use_cases_array)
return generated_class_diagram_path, generated_usecase_diagram_path
if assignment_type == 1:
generated_usecase_diagram_path = generate_use_case_diagram(data, extracted_relationships,
actors_and_use_cases_array)
return generated_usecase_diagram_path
elif assignment_type == 2:
generated_class_diagram_path = generate_class(data, cleaned_extracted_actions)
return generated_class_diagram_path
elif assignment_type == 3:
generated_class_diagram_path = generate_class(data, cleaned_extracted_actions)
generated_usecase_diagram_path = generate_use_case_diagram(data, extracted_relationships,
actors_and_use_cases_array)
return generated_class_diagram_path, generated_usecase_diagram_path
......@@ -17,9 +17,10 @@ def get_noun_chunks(sentence):
return list(sentence.noun_chunks)
def get_nouns_pnouns(sentence):
# getting nouns and pronouns (pos tagging)
def get_nouns_pronouns(sentence):
for token in sentence:
if token.pos_ == "PROPN" and token.pos_ != None:
if token.pos_ == "PROPN" and token.pos_ is not None:
return token
......
......@@ -14,7 +14,7 @@ import tensorflow as tf
from config.database import db
from models.actor_and_use_case import ActorANDUseCase
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
# pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
from services.extend_include_relationship_detection_service import detect_extend_include_relationship
from services.generalization_relationship_detection_service import detect_generalization_relationship
......
This diff is collapsed.
......@@ -57,36 +57,40 @@ const ViewAssignment = () => {
</div>
</div>
<div className="row">
<div className="col-12">
<div className="card">
<h3 style={{ paddingBottom: "2rem" }}>Generated usecase diagram</h3>
<br />
<div className="flex" style={{ justifyContent: "center" }}>
<img
src={assetsUrl + diagrams.usecase_diagram}
alt="usecase"
style={{ width: "80%", height: "80%" }}
/>
{diagrams.usecase_diagram && (
<div className="row">
<div className="col-12">
<div className="card">
<h3 style={{ paddingBottom: "2rem" }}>Generated usecase diagram</h3>
<br />
<div className="flex" style={{ justifyContent: "center" }}>
<img
src={assetsUrl + diagrams.usecase_diagram}
alt="usecase"
style={{ width: "80%", height: "80%" }}
/>
</div>
</div>
</div>
</div>
</div>
<div className="row">
<div className="col-12">
<div className="card">
<h3 style={{ paddingBottom: "2rem" }}>Generated class diagram</h3>
<br />
<div className="flex" style={{ justifyContent: "center" }}>
<img
src={assetsUrl + diagrams.class_diagram}
alt="usecase"
style={{ width: "80%", height: "80%" }}
/>
)}
{diagrams.class_diagram && (
<div className="row">
<div className="col-12">
<div className="card">
<h3 style={{ paddingBottom: "2rem" }}>Generated class diagram</h3>
<br />
<div className="flex" style={{ justifyContent: "center" }}>
<img
src={assetsUrl + diagrams.class_diagram}
alt="usecase"
style={{ width: "80%", height: "80%" }}
/>
</div>
</div>
</div>
</div>
</div>
)}
</div>
</div>
</div>
......
......@@ -21,6 +21,7 @@ const ManageAssignments = () => {
content: "",
title: "",
plagiarism_percentage: "",
assignment_type: "",
module_id: "",
start_at: "",
end_at: "",
......@@ -28,7 +29,17 @@ const ManageAssignments = () => {
const [assignments, setAssignments] = useState([]);
const [modules, setModules] = useState([]);
const fields = ["", "ID", "Module Code", "Module Name", "Title", "Start At", "End At", "Actions"];
const fields = [
"",
"ID",
"Module Code",
"Module Name",
"Assignment Type",
"Title",
"Start At",
"End At",
"Actions",
];
const renderOrderHead = (item, index) => <th key={index}>{item}</th>;
......@@ -38,6 +49,7 @@ const ManageAssignments = () => {
<td>{item.id}</td>
<td>{item.code}</td>
<td>{item.name}</td>
<td>{item.assignment_type}</td>
<td>{item.title}</td>
<td>{new Date(item.start_at).toLocaleString()}</td>
<td>{new Date(item.end_at).toLocaleString()}</td>
......@@ -93,6 +105,7 @@ const ManageAssignments = () => {
window.alert("Assignment added successfully");
setBtnState(false);
setIsFullScreenLoading(false);
window.location.reload();
} catch (err) {
setBtnState(false);
setIsFullScreenLoading(false);
......@@ -147,7 +160,9 @@ const ManageAssignments = () => {
<div id="main" className="layout__content">
<TopNav />
<div className="layout__content-main">
{isFullScreenLoading && <FullScreenLoader title={"Generating Model Diagrams..."} />}
{isFullScreenLoading && (
<FullScreenLoader title={"Creating assignment and generating model diagrams..."} />
)}
<h1 className="page-header">Manage Assignments</h1>
<div className="row">
<div className="col-12">
......@@ -219,6 +234,29 @@ const ManageAssignments = () => {
</select>
</div>
</div>
<div className="col-4">
<div className="row-user">
<select
name="position"
id="position"
required
onChange={e => {
setAssignment({
...assignment,
assignment_type: e.target.value,
});
}}
>
<option value="position" disabled selected>
PLEASE SELECT ASSIGNMENT TYPE
</option>
<option value="1">Type 1 - Use Case Diagram Only</option>
<option value="2">Type 2 - Class Diagram Only</option>
<option value="3">Type 3 - Use Case and Class Diagram Only</option>
</select>
</div>
</div>
<div className="col-4">
<div className="row-user">
......
......@@ -18,29 +18,23 @@ import ProfilePicture from "../assets/images/admin-user-img.jpg";
import status from "../helpers/greeting";
const SupplierDashboard = () => {
const StudentDashboard = () => {
const [error, setError] = useState("");
const [isLoading, setIsLoading] = useState(true);
const [orderDetails, setOrderDetails] = useState([]);
const [StudentSubjects, setStudentSubjects] = useState([]);
const [value, onChange] = useState(new Date());
const fields = [
"",
"Assignment",
"Subject",
"Subject Code",
];
const fields = ["", "Assignment", "Subject", "Subject Code"];
const subjects = [
{ ModuleCode: "IT20300", ModuleName: "CTSE", assign: "Assignment 01" },
{ ModuleCode: "IT30300", ModuleName: "DMS", assign: "Assignment 02" },
{ ModuleCode: "IT40300", ModuleName: "SPM", assign: "Assignment 03" }
]
{ ModuleCode: "IT40300", ModuleName: "SPM", assign: "Assignment 03" },
];
const renderOrderHead = (item, index) => <th key={index}>{item}</th>;
const renderOrderBody = (item, index) => (
<tr key={index}>
<td>{ }</td>
<td>{}</td>
<td>{item.assign}</td>
<td>{item.ModuleName}</td>
<td>{item.ModuleCode}</td>
......@@ -64,17 +58,17 @@ const SupplierDashboard = () => {
</tr>
);
const getAllOrders = async () => {
const getAllSubjects = async () => {
try {
const res = await axios.get("orders/supplier/my");
setOrderDetails(res.data.orders);
const res = await axios.get("/subjects");
setStudentSubjects(subjects);
setIsLoading(false);
} catch (err) {
console.log(err.response);
}
};
useEffect(() => getAllOrders(), []);
useEffect(() => getAllSubjects(), []);
return (
<div>
......@@ -91,16 +85,16 @@ const SupplierDashboard = () => {
<h3>
Today you have{" "}
{
orderDetails.filter(
(orderDetail) =>
orderDetail.DeliveryStatus === "pending"
StudentSubjects.filter(
(StudentSubject) =>
StudentSubject.stubjectstatus === "pending"
).length
}
{localStorage.setItem(
"notifications",
orderDetails.filter(
(orderDetail) =>
orderDetail.DeliveryStatus === "pending"
StudentSubjects.filter(
(StudentSubject) =>
StudentSubject.stubjectstatus === "pending"
).length
)}{" "}
Assignments to Complete
......@@ -140,18 +134,17 @@ const SupplierDashboard = () => {
<div className="card">
<div className="flex">
<h2 className="request-title">Assignments to complete</h2>
</div>
{/* {isLoading ? (
<Spinner />
) : orderDetails.length > 0 ? ( */}
<Table
limit="5"
headData={fields}
renderHead={(item, index) => renderOrderHead(item, index)}
bodyData={subjects}
renderBody={(item, index) => renderOrderBody(item, index)}
/>
<Table
limit="5"
headData={fields}
renderHead={(item, index) => renderOrderHead(item, index)}
bodyData={subjects}
renderBody={(item, index) => renderOrderBody(item, index)}
/>
{/* ) : (
<>
{setError("No Assignments found")}
......@@ -184,4 +177,4 @@ const SupplierDashboard = () => {
);
};
export default SupplierDashboard;
export default StudentDashboard;
......@@ -11,155 +11,44 @@ import Badge from "../components/badge/Badge";
import "../assets/css/Usercreate.css";
const ManageOrdersSupplier = () => {
const SubjectsStudent = () => {
const [error, setError] = useState("");
const [isLoading, setIsLoading] = useState(true);
const [orderDetails, setOrderDetails] = useState([]);
const fields = [
"",
"Module Code",
"Module Name",
"Year",
"",
"Actions",
];
const [SudentSubjects, setSudentSubjects] = useState([]);
const fields = ["", "Module Code", "Module Name", "Year", "", "Actions"];
const subjects = [
{ ModuleCode: "IT20300", ModuleName: "CTSE", Year: "4th Year" },
{ ModuleCode: "IT30300", ModuleName: "DMS", Year: "4th Year" },
{ ModuleCode: "IT40300", ModuleName: "SPM:", Year: "4th Year" }
]
{ ModuleCode: "IT40300", ModuleName: "SPM:", Year: "4th Year" },
];
const renderOrderHead = (item, index) => <th key={index}>{item}</th>;
const renderOrderBody = (item, index) => (
<tr key={index}>
<td>{ }</td>
<td>{}</td>
<td>{item.ModuleCode}</td>
<td>{item.ModuleName}</td>
<td>{item.Year}</td>
<td>{ }</td>
<td><Link to={`/auth/student/assignment`}>
<button className="view-btn">View</button>
</Link></td>
<td>{}</td>
<td>
<div className="row-user" style={{ paddingTop: "0" }}>
{item.DeliveryStatus === "pending" ? (
<div
style={{ cursor: "pointer" }}
onClick={() => {
if (
window.confirm(
"Are you sure to change order status as preparing?"
)
) {
changeDeliveryStatusAsPreparing(item._id);
}
}}
>
<Badge type="warning" content="Mark as preparing" />
</div>
) : item.DeliveryStatus === "preparing" ? (
<div
style={{ cursor: "pointer" }}
onClick={() => {
if (
window.confirm(
"Are you sure to change order status as delivering?"
)
) {
changeDeliveryStatusAsDelivering(item._id);
}
}}
>
<Badge type="primary" content="Mark as delivering" />
</div>
) : item.DeliveryStatus === "delivering" ? (
<div
style={{ cursor: "pointer" }}
onClick={() => {
if (
window.confirm(
"Are you sure to change order status as delivered?"
)
) {
changeDeliveryStatusAsDelivered(item._id);
}
}}
>
<Badge type="success" content="Mark as delivered" />
</div>
) : item.DeliveryStatus === "delivered" ? (
<div style={{ cursor: "pointer" }}>
<Link to={`/auth/supplier/deliveryreports/${item._id}`}>
<Badge type="normal" content="Send Delivery Report" />
</Link>
</div>
) : item.DeliveryStatus === "submitted" ? (
<div>
<Badge type="normal" content="Completed" />
</div>
) : (
""
)}
</div>
<Link to={`/auth/student/assignment`}>
<button className="view-btn">View</button>
</Link>
</td>
</tr>
);
const changeDeliveryStatusAsPreparing = async (id) => {
try {
const res = await axios.put(`orders/supplier/prepare/${id}`);
if (res.statusText === "OK") {
setIsLoading(true);
getAllOrders();
setError("");
window.alert("Delivery status changed as preparing");
window.location.reload();
setIsLoading(false);
}
} catch (err) {
console.log(err.response);
}
};
const changeDeliveryStatusAsDelivering = async (id) => {
try {
const res = await axios.put(`orders/supplier/deliver/${id}`);
if (res.statusText === "OK") {
getAllOrders();
setIsLoading(false);
window.alert("Delivery status changed as delivering");
window.location.reload();
}
} catch (err) {
console.log(err.response);
}
};
const changeDeliveryStatusAsDelivered = async (id) => {
try {
const res = await axios.put(`orders/supplier/delivered/${id}`);
if (res.statusText === "OK") {
getAllOrders();
window.alert("Delivery status changed as delivered");
setIsLoading(false);
window.location.reload();
}
} catch (err) {
console.log(err.response);
}
};
const getAllOrders = async () => {
const getAllSubjects = async () => {
try {
const res = await axios.get("orders/supplier");
setOrderDetails(res.data.orders);
const res = await axios.get("/subjects");
setSudentSubjects(res.data.orders);
setIsLoading(false);
} catch (err) {
console.log(err.response);
}
};
useEffect(() => getAllOrders(), []);
useEffect(() => getAllSubjects(), []);
return (
<div>
......@@ -193,4 +82,4 @@ const ManageOrdersSupplier = () => {
);
};
export default ManageOrdersSupplier;
export default SubjectsStudent;
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