commit unversioned files ;)
parent
78d570ad4f
commit
844a26a287
@ -0,0 +1,30 @@
|
||||
import datetime
|
||||
|
||||
from models.enums import ContainerLength, ContainerType
|
||||
|
||||
PAYMENT_SCHEMA = {
|
||||
"standart": [[0, 5, 25], [5, 20, 40], [40, 1000000, 75]],
|
||||
"reefer": [[0, 7, 35], [7, 30, 60], [30, 1000000, 115]],
|
||||
}
|
||||
|
||||
|
||||
def calc_storage_amount(depot, container):
|
||||
result = (depot.expedited_on - depot.received_on + datetime.timedelta(days=1)).days
|
||||
if container.container_type == ContainerType.ct_reefer:
|
||||
data = PAYMENT_SCHEMA["reefer"]
|
||||
result -= 1
|
||||
else:
|
||||
data = PAYMENT_SCHEMA["standart"]
|
||||
|
||||
for i in data:
|
||||
start, end, price = i
|
||||
if start <= result < end:
|
||||
price_per_day = price
|
||||
break
|
||||
if container.container_length in (
|
||||
ContainerLength.cl_40_ft,
|
||||
ContainerLength.cl_45_ft,
|
||||
):
|
||||
result *= 2
|
||||
result = result * price_per_day
|
||||
return result
|
||||
@ -0,0 +1,34 @@
|
||||
insert into common_containerkindmodel values(1, 'Standart', '', '');
|
||||
insert into common_containerkindmodel values(2, 'Reefer', '', '');
|
||||
insert into common_containerkindmodel values(3, 'Opentop', '', '');
|
||||
insert into common_containerkindmodel values(4, 'FlatRack', '', '');
|
||||
insert into common_containerkindmodel values(5, 'Tank', '', '');
|
||||
insert into common_containerkindmodel values(6, 'Platform', '', '');
|
||||
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(1, '20GP', 20, false, 1, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(2, '40GP', 40, false, 1, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(3, '40HC', 40, true, 1, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(4, '20RF', 20, false, 2, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(5, '40RF', 40, false, 2, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(6, '20OT', 20, false, 3, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(7, '40OT', 40, false, 3, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(8, '20FR', 20, false, 4, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(9, '20FRPL', 20, false, 6, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(10, '45HC', 45, true, 1, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(11, '40FRPL', 40, false, 6, false);
|
||||
insert into common_containertypemodel (id, name, length, height, container_type_id, deleted) values(12, '40HR', 40, true, 2, false);
|
||||
|
||||
insert into common_companymodel (id, name, short_name, description) values (1, 'GMS', 'GMS', 'Global Maritime Servises');
|
||||
insert into common_companymodel (id, name, short_name, description) values (2, 'TO', 'TO', 'Терминален оператор');
|
||||
|
||||
insert into common_linesmodel (id, name, short_name, description, company_id) values (1, 'GMS', 'GMS', 'GMS line', 1);
|
||||
insert into common_linesmodel (id, name, short_name, description, company_id) values (2, 'HPG', 'HPG', 'Hapag Lloyds line', 1);
|
||||
insert into common_linesmodel (id, name, short_name, description, company_id) values (3, 'TO', 'TO', 'Терминален оператор line', 2);
|
||||
|
||||
insert into accounts_employeepermission (id, codename, name) values (1, 'can_manage_containers', 'Can manage containers');
|
||||
insert into accounts_employeepermission (id, codename, name) values (2, 'can_view_reports', 'Can view reports');
|
||||
insert into accounts_employeepermission (id, codename, name) values (3, 'can_handle_operations', 'Can handle operations');
|
||||
|
||||
insert into accounts_clientpermission (id, codename, name) values (1, 'can_book_container', 'Can book container');
|
||||
insert into accounts_clientpermission (id, codename, name) values (2, 'can_view_bookings', 'Can view bookings');
|
||||
insert into accounts_clientpermission (id, codename, name) values (3, 'can_manage_company_users', 'Can manage company users');
|
||||
@ -0,0 +1,48 @@
|
||||
<svg width="200" height="260" viewBox="0 0 200 260" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- Roof structure -->
|
||||
<polyline points="10,60 100,10 190,60" fill="none" stroke="#5B2C06" stroke-width="4"/>
|
||||
|
||||
<!-- Two vertical cables from roof to hook box -->
|
||||
<line x1="95" y1="10" x2="95" y2="80" stroke="#5B2C06" stroke-width="2"/>
|
||||
<line x1="105" y1="10" x2="105" y2="80" stroke="#5B2C06" stroke-width="2"/>
|
||||
|
||||
<!-- Hook box -->
|
||||
<rect x="90" y="80" width="20" height="10" fill="#5B2C06"/>
|
||||
|
||||
<!-- Hook curve -->
|
||||
<path d="M100,90 C95,95 105,105 100,110" stroke="#5B2C06" stroke-width="3" fill="none"/>
|
||||
|
||||
<!-- Thin cables from hook to container edges -->
|
||||
<line x1="100" y1="110" x2="50" y2="110" stroke="#5B2C06" stroke-width="1"/>
|
||||
<line x1="100" y1="110" x2="150" y2="110" stroke="#5B2C06" stroke-width="1"/>
|
||||
|
||||
<!-- Container body -->
|
||||
<rect x="50" y="110" width="100" height="60" fill="#A0522D" stroke="#5B2C06" stroke-width="2"/>
|
||||
|
||||
<!-- Left section (corrugated metal look) -->
|
||||
<rect x="50" y="110" width="30" height="60" fill="#8B4513"/>
|
||||
<g stroke="#5B2C06" stroke-width="1">
|
||||
<line x1="55" y1="110" x2="55" y2="170"/>
|
||||
<line x1="60" y1="110" x2="60" y2="170"/>
|
||||
<line x1="65" y1="110" x2="65" y2="170"/>
|
||||
<line x1="70" y1="110" x2="70" y2="170"/>
|
||||
<line x1="75" y1="110" x2="75" y2="170"/>
|
||||
</g>
|
||||
|
||||
<!-- Right section (doors) -->
|
||||
<rect x="80" y="110" width="70" height="60" fill="#FFFFFF" stroke="#5B2C06" stroke-width="2"/>
|
||||
<line x1="115" y1="110" x2="115" y2="170" stroke="#5B2C06" stroke-width="2"/>
|
||||
|
||||
<!-- Stacked boxes -->
|
||||
<rect x="90" y="160" width="10" height="10" fill="#A0522D"/>
|
||||
<rect x="105" y="160" width="10" height="10" fill="#A0522D"/>
|
||||
<rect x="120" y="160" width="10" height="10" fill="#A0522D"/>
|
||||
<rect x="105" y="150" width="10" height="10" fill="#A0522D"/>
|
||||
<rect x="105" y="140" width="10" height="10" fill="#A0522D"/>
|
||||
|
||||
<!-- Company name -->
|
||||
<text x="100" y="200" font-family="monospace" font-size="20" text-anchor="middle" fill="#5B2C06" font-weight="bold">K-DepoT</text>
|
||||
|
||||
<!-- Slogan -->
|
||||
<text x="100" y="220" font-family="monospace" font-size="12" text-anchor="middle" fill="#5B2C06" letter-spacing="2">SAFE AND READY</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,3 @@
|
||||
|
||||
<!-- saved from url=(0011)about:blank -->
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script>window.__CF$cv$params={r:'9564537ddd1dd0cf',t:'MTc1MTAyMDgyNS4wMDAwMDA='};var a=document.createElement('script');a.nonce='3e3a48cb-474b-40a6-bcdd-03614e327eff';a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);</script><script src="https://chatgpt.com/cdn-cgi/challenge-platform/scripts/jsd/main.js"></script></head><body></body></html>
|
||||
@ -0,0 +1,87 @@
|
||||
|
||||
/* === Sidebar === */
|
||||
.sidebar {
|
||||
width: 16rem;
|
||||
height: 100%;
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(180deg, #0f4c81 0%, #1a6baf 100%);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.sidebar-header {
|
||||
padding: 1.25rem;
|
||||
border-bottom: 1px solid #2b6cb0;
|
||||
}
|
||||
.sidebar-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
.sidebar-subtitle {
|
||||
font-size: 0.875rem;
|
||||
color: #bfdbfe;
|
||||
}
|
||||
.nav-section {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.nav-label {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
color: #93c5fd;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1.5rem;
|
||||
color: white;
|
||||
transition: all 0.2s;
|
||||
text-decoration: none;
|
||||
}
|
||||
.nav-item:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.nav-item.active {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
border-left: 4px solid white;
|
||||
}
|
||||
.nav-icon {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
margin-right: 0.75rem;
|
||||
}
|
||||
.user-profile {
|
||||
padding: 1rem;
|
||||
border-top: 1px solid #2b6cb0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.user-avatar {
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
border-radius: 9999px;
|
||||
background-color: #3b82f6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
}
|
||||
.user-details {
|
||||
margin-left: 0.75rem;
|
||||
}
|
||||
.user-name {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.user-role {
|
||||
font-size: 0.75rem;
|
||||
color: #bfdbfe;
|
||||
}
|
||||
.logout-button {
|
||||
margin-left: auto;
|
||||
color: white;
|
||||
}
|
||||
Loading…
Reference in New Issue