diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index 625a9a3..2aa9bed 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index fbbd525..abd7cb1 100644 --- a/config/settings.py +++ b/config/settings.py @@ -189,3 +189,5 @@ if EMAIL_USE_SSL: # https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +LOGIN_REDIRECT_URL = 'dashboard' +LOGOUT_REDIRECT_URL = 'index' diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc index e8430d1..b5c40e3 100644 Binary files a/core/__pycache__/forms.cpython-311.pyc and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 4e4db3b..0676643 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index eaa4220..d97f88e 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/forms.py b/core/forms.py index 278dc97..a49a99b 100644 --- a/core/forms.py +++ b/core/forms.py @@ -1,7 +1,7 @@ from django import forms from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ -from .models import Profile +from .models import Profile, Parcel class UserRegistrationForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput, label=_("Password")) @@ -36,4 +36,25 @@ class UserRegistrationForm(forms.ModelForm): role=self.cleaned_data['role'], phone_number=self.cleaned_data['phone_number'] ) - return user \ No newline at end of file + return user + +class ParcelForm(forms.ModelForm): + class Meta: + model = Parcel + fields = ['description', 'weight', 'pickup_address', 'delivery_address', 'receiver_name', 'receiver_phone'] + widgets = { + 'description': forms.Textarea(attrs={'rows': 3, 'class': 'form-control', 'placeholder': _('What are you sending?')}), + 'weight': forms.NumberInput(attrs={'class': 'form-control', 'step': '0.1'}), + 'pickup_address': forms.TextInput(attrs={'class': 'form-control', 'placeholder': _('123 Street, City')}), + 'delivery_address': forms.TextInput(attrs={'class': 'form-control', 'placeholder': _('456 Avenue, City')}), + 'receiver_name': forms.TextInput(attrs={'class': 'form-control'}), + 'receiver_phone': forms.TextInput(attrs={'class': 'form-control'}), + } + labels = { + 'description': _('Package Description'), + 'weight': _('Weight (kg)'), + 'pickup_address': _('Pickup Address'), + 'delivery_address': _('Delivery Address'), + 'receiver_name': _('Receiver Name'), + 'receiver_phone': _('Receiver Phone'), + } diff --git a/core/templates/base.html b/core/templates/base.html index 6fef6cc..5fc0e5a 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,4 +1,4 @@ -{% load i18n static %} +{% load i18n static i18n_urls %} {% get_current_language as LANGUAGE_CODE %} {% get_language_info for LANGUAGE_CODE as lang %} @@ -39,6 +39,10 @@ margin-left: auto !important; margin-right: 0 !important; } + .dropdown-menu-end { + left: 0 !important; + right: auto !important; + } {% endif %} @@ -58,6 +62,9 @@ {% trans "How it Works" %} {% if user.is_authenticated %} + @@ -84,9 +91,10 @@ {% get_available_languages as LANGUAGES %} {% for lang_code, lang_name in LANGUAGES %}
  • + {% translate_url lang_code as the_redirect_url %}
    {% csrf_token %} - +
  • +
    + {% if messages %} + {% for message in messages %} + + {% endfor %} + {% endif %} +
    +
    {% block content %}{% endblock %}
    @@ -118,4 +141,4 @@ - + \ No newline at end of file diff --git a/core/templates/core/driver_dashboard.html b/core/templates/core/driver_dashboard.html new file mode 100644 index 0000000..7639897 --- /dev/null +++ b/core/templates/core/driver_dashboard.html @@ -0,0 +1,82 @@ +{% extends 'base.html' %} +{% load i18n %} + +{% block content %} +
    +

    {% trans "Driver Dashboard" %}

    + + + +
    + +
    + {% if available_parcels %} +
    + {% for parcel in available_parcels %} +
    +
    +
    +
    {{ parcel.description|truncatechars:30 }}
    +

    {% trans "Pickup" %}: {{ parcel.pickup_address }}

    +

    {% trans "Delivery" %}: {{ parcel.delivery_address }}

    +

    {% trans "Weight" %}: {{ parcel.weight }} kg

    + + {% csrf_token %} + + +
    +
    +
    + {% endfor %} +
    + {% else %} +

    {% trans "No shipments available at the moment." %}

    + {% endif %} +
    + + +
    + {% if my_parcels %} +
    + {% for parcel in my_parcels %} +
    +
    +
    +
    + #{{ parcel.tracking_number }} + {{ parcel.get_status_display }} +
    +
    {{ parcel.description|truncatechars:30 }}
    +

    {% trans "To" %}: {{ parcel.delivery_address }}

    +

    {% trans "Receiver" %}: {{ parcel.receiver_name }}

    + +
    + {% csrf_token %} + + +
    +
    +
    +
    + {% endfor %} +
    + {% else %} +

    {% trans "You haven't accepted any shipments yet." %}

    + {% endif %} +
    +
    +
    +{% endblock %} diff --git a/core/templates/core/shipment_request.html b/core/templates/core/shipment_request.html index de179ad..0970ab4 100644 --- a/core/templates/core/shipment_request.html +++ b/core/templates/core/shipment_request.html @@ -1,37 +1,27 @@ {% extends 'base.html' %} {% load static %} +{% load i18n %} {% block content %}
    -

    Request a Shipment

    +

    {% trans "Request a Shipment" %}

    {% csrf_token %}
    -
    - - + {% for field in form %} +
    + + {{ field }} + {% if field.errors %} +
    {{ field.errors }}
    + {% endif %}
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - + {% endfor %} +
    +
    @@ -39,4 +29,4 @@
    -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/core/templates/core/shipper_dashboard.html b/core/templates/core/shipper_dashboard.html new file mode 100644 index 0000000..9eb4ad4 --- /dev/null +++ b/core/templates/core/shipper_dashboard.html @@ -0,0 +1,41 @@ +{% extends 'base.html' %} +{% load i18n %} + +{% block content %} +
    +
    +

    {% trans "My Shipments" %}

    + {% trans "New Shipment" %} +
    + + {% if parcels %} +
    + {% for parcel in parcels %} +
    +
    +
    +
    + #{{ parcel.tracking_number }} + + {{ parcel.get_status_display }} + +
    +
    {{ parcel.description|truncatechars:30 }}
    +

    {% trans "From" %}: {{ parcel.pickup_address }}

    +

    {% trans "To" %}: {{ parcel.delivery_address }}

    +
    +

    {% trans "Receiver" %}: {{ parcel.receiver_name }}

    +

    {% trans "Carrier" %}: {% if parcel.carrier %}{{ parcel.carrier.get_full_name|default:parcel.carrier.username }}{% else %}{% trans "Waiting for pickup" %}{% endif %}

    +
    +
    +
    + {% endfor %} +
    + {% else %} +
    +

    {% trans "You haven't sent any shipments yet." %}

    + {% trans "Send your first shipment" %} +
    + {% endif %} +
    +{% endblock %} diff --git a/core/templatetags/__init__.py b/core/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/templatetags/__pycache__/__init__.cpython-311.pyc b/core/templatetags/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..b088eae Binary files /dev/null and b/core/templatetags/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/templatetags/__pycache__/i18n_urls.cpython-311.pyc b/core/templatetags/__pycache__/i18n_urls.cpython-311.pyc new file mode 100644 index 0000000..867aa56 Binary files /dev/null and b/core/templatetags/__pycache__/i18n_urls.cpython-311.pyc differ diff --git a/core/templatetags/i18n_urls.py b/core/templatetags/i18n_urls.py new file mode 100644 index 0000000..db291e8 --- /dev/null +++ b/core/templatetags/i18n_urls.py @@ -0,0 +1,12 @@ +from django import template +from django.urls import translate_url as django_translate_url + +register = template.Library() + +@register.simple_tag(takes_context=True) +def translate_url(context, lang_code): + request = context.get('request') + if not request: + return '' + path = request.get_full_path() + return django_translate_url(path, lang_code) diff --git a/core/urls.py b/core/urls.py index ddda4d3..9d0cf81 100644 --- a/core/urls.py +++ b/core/urls.py @@ -7,6 +7,9 @@ urlpatterns = [ path('register/', views.register, name='register'), path('login/', auth_views.LoginView.as_view(template_name='core/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_view(next_page='index'), name='logout'), + path('dashboard/', views.dashboard, name='dashboard'), path('shipment-request/', views.shipment_request, name='shipment_request'), - path('article-detail/', views.article_detail, name='article_detail'), -] + path('accept-parcel//', views.accept_parcel, name='accept_parcel'), + path('update-status//', views.update_status, name='update_status'), + path('article/', views.article_detail, name='article_detail'), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index f9e0421..218d1cd 100644 --- a/core/views.py +++ b/core/views.py @@ -1,10 +1,11 @@ -from django.shortcuts import render, redirect -from django.contrib.auth import login, authenticate +from django.shortcuts import render, redirect, get_object_or_404 +from django.contrib.auth import login, authenticate, logout from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.decorators import login_required from .models import Parcel, Profile -from .forms import UserRegistrationForm +from .forms import UserRegistrationForm, ParcelForm from django.utils.translation import gettext_lazy as _ +from django.contrib import messages def index(request): tracking_id = request.GET.get('tracking_id') @@ -28,17 +29,67 @@ def register(request): if form.is_valid(): user = form.save() login(request, user) - return redirect('index') + return redirect('dashboard') else: form = UserRegistrationForm() return render(request, 'core/register.html', {'form': form}) +@login_required +def dashboard(request): + profile = request.user.profile + if profile.role == 'shipper': + parcels = Parcel.objects.filter(shipper=request.user).order_by('-created_at') + return render(request, 'core/shipper_dashboard.html', {'parcels': parcels}) + else: + # Car Owner view + available_parcels = Parcel.objects.filter(status='pending').order_by('-created_at') + my_parcels = Parcel.objects.filter(carrier=request.user).exclude(status='delivered').order_by('-created_at') + return render(request, 'core/driver_dashboard.html', { + 'available_parcels': available_parcels, + 'my_parcels': my_parcels + }) + @login_required def shipment_request(request): + if request.user.profile.role != 'shipper': + messages.error(request, _("Only shippers can request shipments.")) + return redirect('dashboard') + if request.method == 'POST': - # Logic for creating shipment will go here - pass - return render(request, 'core/shipment_request.html') + form = ParcelForm(request.POST) + if form.is_valid(): + parcel = form.save(commit=False) + parcel.shipper = request.user + parcel.save() + messages.success(request, _("Shipment requested successfully! Tracking ID: ") + parcel.tracking_number) + return redirect('dashboard') + else: + form = ParcelForm() + return render(request, 'core/shipment_request.html', {'form': form}) + +@login_required +def accept_parcel(request, parcel_id): + if request.user.profile.role != 'car_owner': + messages.error(request, _("Only car owners can accept shipments.")) + return redirect('dashboard') + + parcel = get_object_or_404(Parcel, id=parcel_id, status='pending') + parcel.carrier = request.user + parcel.status = 'picked_up' + parcel.save() + messages.success(request, _("You have accepted the shipment!")) + return redirect('dashboard') + +@login_required +def update_status(request, parcel_id): + parcel = get_object_or_404(Parcel, id=parcel_id, carrier=request.user) + if request.method == 'POST': + new_status = request.POST.get('status') + if new_status in dict(Parcel.STATUS_CHOICES): + parcel.status = new_status + parcel.save() + messages.success(request, _("Status updated successfully!")) + return redirect('dashboard') def article_detail(request): - return render(request, 'core/article_detail.html') + return render(request, 'core/article_detail.html') \ No newline at end of file diff --git a/locale/ar/LC_MESSAGES/django.mo b/locale/ar/LC_MESSAGES/django.mo index d09703c..874c96f 100644 Binary files a/locale/ar/LC_MESSAGES/django.mo and b/locale/ar/LC_MESSAGES/django.mo differ diff --git a/locale/ar/LC_MESSAGES/django.po b/locale/ar/LC_MESSAGES/django.po index b844de2..5aea45a 100644 --- a/locale/ar/LC_MESSAGES/django.po +++ b/locale/ar/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-25 07:13+0000\n" +"POT-Creation-Date: 2026-01-25 07:25+0000\n" "PO-Revision-Date: 2026-01-25 07:13+0000\n" "Last-Translator: Gemini\n" "Language-Team: Arabic\n" @@ -15,8 +15,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " -" && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" #: core/forms.py:7 msgid "Password" @@ -54,6 +54,42 @@ msgstr "اسم العائلة" msgid "Passwords don't match" msgstr "كلمات المرور غير متطابقة" +#: core/forms.py:46 +msgid "What are you sending?" +msgstr "ماذا سترسل؟" + +#: core/forms.py:48 +msgid "123 Street, City" +msgstr "123 شارع، مدينة" + +#: core/forms.py:49 +msgid "456 Avenue, City" +msgstr "456 جادة، مدينة" + +#: core/forms.py:54 +msgid "Package Description" +msgstr "وصف الطرد" + +#: core/forms.py:55 core/models.py:36 +msgid "Weight (kg)" +msgstr "الوزن (كجم)" + +#: core/forms.py:56 core/models.py:38 +msgid "Pickup Address" +msgstr "عنوان الاستلام" + +#: core/forms.py:57 core/models.py:39 +msgid "Delivery Address" +msgstr "عنوان التوصيل" + +#: core/forms.py:58 core/models.py:41 +msgid "Receiver Name" +msgstr "اسم المستلم" + +#: core/forms.py:59 core/models.py:42 +msgid "Receiver Phone" +msgstr "هاتف المستلم" + #: core/models.py:8 core/models.py:32 msgid "Shipper" msgstr "شاحن" @@ -102,7 +138,7 @@ msgstr "ملغي" msgid "Tracking Number" msgstr "رقم التتبع" -#: core/models.py:33 +#: core/models.py:33 core/templates/core/shipper_dashboard.html:28 msgid "Carrier" msgstr "الناقل" @@ -110,30 +146,10 @@ msgstr "الناقل" msgid "Description" msgstr "الوصف" -#: core/models.py:36 -msgid "Weight (kg)" -msgstr "الوزن (كجم)" - #: core/models.py:36 msgid "Weight in kg" msgstr "الوزن بالكيلوجرام" -#: core/models.py:38 -msgid "Pickup Address" -msgstr "عنوان الاستلام" - -#: core/models.py:39 -msgid "Delivery Address" -msgstr "عنوان التوصيل" - -#: core/models.py:41 -msgid "Receiver Name" -msgstr "اسم المستلم" - -#: core/models.py:42 -msgid "Receiver Phone" -msgstr "هاتف المستلم" - #: core/models.py:44 core/templates/core/index.html:30 msgid "Status" msgstr "الحالة" @@ -158,35 +174,94 @@ msgstr "طرود" msgid "Small Shipments, Smart Delivery" msgstr "شحنات صغيرة، توصيل ذكي" -#: core/templates/base.html:58 +#: core/templates/base.html:62 msgid "How it Works" msgstr "كيف يعمل" -#: core/templates/base.html:62 +#: core/templates/base.html:66 +msgid "Dashboard" +msgstr "لوحة التحكم" + +#: core/templates/base.html:69 msgid "Hello" msgstr "مرحباً" -#: core/templates/base.html:67 +#: core/templates/base.html:74 msgid "Logout" msgstr "تسجيل الخروج" -#: core/templates/base.html:72 core/templates/core/login.html:4 +#: core/templates/base.html:79 core/templates/core/login.html:4 #: core/templates/core/login.html:25 msgid "Login" msgstr "تسجيل الدخول" -#: core/templates/base.html:75 core/templates/core/register.html:4 +#: core/templates/base.html:82 core/templates/core/register.html:4 msgid "Register" msgstr "تسجيل" -#: core/templates/base.html:101 core/templates/core/index.html:13 +#: core/templates/base.html:110 +msgid "Find Loads" +msgstr "البحث عن شحنات" + +#: core/templates/base.html:112 core/templates/core/index.html:13 msgid "Start Shipping" msgstr "ابدأ الشحن" -#: core/templates/base.html:114 +#: core/templates/base.html:137 msgid "All rights reserved." msgstr "جميع الحقوق محفوظة." +#: core/templates/core/driver_dashboard.html:6 +msgid "Driver Dashboard" +msgstr "لوحة تحكم السائق" + +#: core/templates/core/driver_dashboard.html:10 +msgid "Available Shipments" +msgstr "الشحنات المتوفرة" + +#: core/templates/core/driver_dashboard.html:13 +msgid "My Deliveries" +msgstr "توصيلاتي" + +#: core/templates/core/driver_dashboard.html:27 +msgid "Pickup" +msgstr "الاستلام" + +#: core/templates/core/driver_dashboard.html:28 +msgid "Delivery" +msgstr "التوصيل" + +#: core/templates/core/driver_dashboard.html:29 +msgid "Weight" +msgstr "الوزن" + +#: core/templates/core/driver_dashboard.html:32 +msgid "Accept Shipment" +msgstr "قبول الشحنة" + +#: core/templates/core/driver_dashboard.html:40 +msgid "No shipments available at the moment." +msgstr "لا توجد شحنات متوفرة حالياً." + +#: core/templates/core/driver_dashboard.html:57 +#: core/templates/core/index.html:35 +#: core/templates/core/shipper_dashboard.html:25 +msgid "To" +msgstr "إلى" + +#: core/templates/core/driver_dashboard.html:58 +#: core/templates/core/shipper_dashboard.html:27 +msgid "Receiver" +msgstr "المستلم" + +#: core/templates/core/driver_dashboard.html:69 +msgid "Update" +msgstr "تحديث" + +#: core/templates/core/driver_dashboard.html:77 +msgid "You haven't accepted any shipments yet." +msgstr "لم تقبل أي شحنات بعد." + #: core/templates/core/index.html:10 msgid "Small Shipments," msgstr "شحنات صغيرة،" @@ -199,7 +274,9 @@ msgstr "توصيل ذكي." msgid "" "masarX connects shippers with local car owners for fast, reliable, and " "trackable deliveries. Your cargo, our priority." -msgstr "يربط مسارX بين الشاحنين وأصحاب السيارات المحليين لتوصيل سريع وموثوق وقابل للتتبع. شحنتك هي أولويتنا." +msgstr "" +"يربط مسارX بين الشاحنين وأصحاب السيارات المحليين لتوصيل سريع وموثوق وقابل " +"للتتبع. شحنتك هي أولويتنا." #: core/templates/core/index.html:14 msgid "Learn More" @@ -218,13 +295,10 @@ msgid "Track" msgstr "تتبع" #: core/templates/core/index.html:34 +#: core/templates/core/shipper_dashboard.html:24 msgid "From" msgstr "من" -#: core/templates/core/index.html:35 -msgid "To" -msgstr "إلى" - #: core/templates/core/index.html:42 msgid "Enter your 10-character tracking ID to see live updates." msgstr "أدخل رقم التتبع المكون من 10 أرقام لرؤية التحديثات المباشرة." @@ -311,6 +385,54 @@ msgstr "لديك حساب بالفعل؟" msgid "Login here" msgstr "سجل دخولك هنا" -#: core/views.py:17 +#: core/templates/core/shipment_request.html:10 +msgid "Request a Shipment" +msgstr "طلب شحنة" + +#: core/templates/core/shipment_request.html:24 +msgid "Submit Request" +msgstr "إرسال الطلب" + +#: core/templates/core/shipper_dashboard.html:7 +msgid "My Shipments" +msgstr "شحناتي" + +#: core/templates/core/shipper_dashboard.html:8 +msgid "New Shipment" +msgstr "شحنة جديدة" + +#: core/templates/core/shipper_dashboard.html:28 +msgid "Waiting for pickup" +msgstr "في انتظار الاستلام" + +#: core/templates/core/shipper_dashboard.html:36 +msgid "You haven't sent any shipments yet." +msgstr "لم ترسل أي شحنات بعد." + +#: core/templates/core/shipper_dashboard.html:37 +msgid "Send your first shipment" +msgstr "أرسل أول شحنة لك" + +#: core/views.py:18 msgid "Parcel not found." -msgstr "الطرد غير موجود." \ No newline at end of file +msgstr "الطرد غير موجود." + +#: core/views.py:55 +msgid "Only shippers can request shipments." +msgstr "فقط الشاحنين يمكنهم طلب شحنات." + +#: core/views.py:64 +msgid "Shipment requested successfully! Tracking ID: " +msgstr "تم طلب الشحنة بنجاح! رقم التتبع: " + +#: core/views.py:73 +msgid "Only car owners can accept shipments." +msgstr "فقط أصحاب السيارات يمكنهم قبول الشحنات." + +#: core/views.py:80 +msgid "You have accepted the shipment!" +msgstr "لقد قبلت الشحنة!" + +#: core/views.py:91 +msgid "Status updated successfully!" +msgstr "تم تحديث الحالة بنجاح!" \ No newline at end of file diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 01f7466..d380b53 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-25 07:13+0000\n" +"POT-Creation-Date: 2026-01-25 07:25+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" + #: core/forms.py:7 msgid "Password" msgstr "" @@ -53,6 +54,42 @@ msgstr "" msgid "Passwords don't match" msgstr "" +#: core/forms.py:46 +msgid "What are you sending?" +msgstr "" + +#: core/forms.py:48 +msgid "123 Street, City" +msgstr "" + +#: core/forms.py:49 +msgid "456 Avenue, City" +msgstr "" + +#: core/forms.py:54 +msgid "Package Description" +msgstr "" + +#: core/forms.py:55 core/models.py:36 +msgid "Weight (kg)" +msgstr "" + +#: core/forms.py:56 core/models.py:38 +msgid "Pickup Address" +msgstr "" + +#: core/forms.py:57 core/models.py:39 +msgid "Delivery Address" +msgstr "" + +#: core/forms.py:58 core/models.py:41 +msgid "Receiver Name" +msgstr "" + +#: core/forms.py:59 core/models.py:42 +msgid "Receiver Phone" +msgstr "" + #: core/models.py:8 core/models.py:32 msgid "Shipper" msgstr "" @@ -101,7 +138,7 @@ msgstr "" msgid "Tracking Number" msgstr "" -#: core/models.py:33 +#: core/models.py:33 core/templates/core/shipper_dashboard.html:28 msgid "Carrier" msgstr "" @@ -109,30 +146,10 @@ msgstr "" msgid "Description" msgstr "" -#: core/models.py:36 -msgid "Weight (kg)" -msgstr "" - #: core/models.py:36 msgid "Weight in kg" msgstr "" -#: core/models.py:38 -msgid "Pickup Address" -msgstr "" - -#: core/models.py:39 -msgid "Delivery Address" -msgstr "" - -#: core/models.py:41 -msgid "Receiver Name" -msgstr "" - -#: core/models.py:42 -msgid "Receiver Phone" -msgstr "" - #: core/models.py:44 core/templates/core/index.html:30 msgid "Status" msgstr "" @@ -157,35 +174,94 @@ msgstr "" msgid "Small Shipments, Smart Delivery" msgstr "" -#: core/templates/base.html:58 +#: core/templates/base.html:62 msgid "How it Works" msgstr "" -#: core/templates/base.html:62 +#: core/templates/base.html:66 +msgid "Dashboard" +msgstr "" + +#: core/templates/base.html:69 msgid "Hello" msgstr "" -#: core/templates/base.html:67 +#: core/templates/base.html:74 msgid "Logout" msgstr "" -#: core/templates/base.html:72 core/templates/core/login.html:4 +#: core/templates/base.html:79 core/templates/core/login.html:4 #: core/templates/core/login.html:25 msgid "Login" msgstr "" -#: core/templates/base.html:75 core/templates/core/register.html:4 +#: core/templates/base.html:82 core/templates/core/register.html:4 msgid "Register" msgstr "" -#: core/templates/base.html:101 core/templates/core/index.html:13 +#: core/templates/base.html:110 +msgid "Find Loads" +msgstr "" + +#: core/templates/base.html:112 core/templates/core/index.html:13 msgid "Start Shipping" msgstr "" -#: core/templates/base.html:114 +#: core/templates/base.html:137 msgid "All rights reserved." msgstr "" +#: core/templates/core/driver_dashboard.html:6 +msgid "Driver Dashboard" +msgstr "" + +#: core/templates/core/driver_dashboard.html:10 +msgid "Available Shipments" +msgstr "" + +#: core/templates/core/driver_dashboard.html:13 +msgid "My Deliveries" +msgstr "" + +#: core/templates/core/driver_dashboard.html:27 +msgid "Pickup" +msgstr "" + +#: core/templates/core/driver_dashboard.html:28 +msgid "Delivery" +msgstr "" + +#: core/templates/core/driver_dashboard.html:29 +msgid "Weight" +msgstr "" + +#: core/templates/core/driver_dashboard.html:32 +msgid "Accept Shipment" +msgstr "" + +#: core/templates/core/driver_dashboard.html:40 +msgid "No shipments available at the moment." +msgstr "" + +#: core/templates/core/driver_dashboard.html:57 +#: core/templates/core/index.html:35 +#: core/templates/core/shipper_dashboard.html:25 +msgid "To" +msgstr "" + +#: core/templates/core/driver_dashboard.html:58 +#: core/templates/core/shipper_dashboard.html:27 +msgid "Receiver" +msgstr "" + +#: core/templates/core/driver_dashboard.html:69 +msgid "Update" +msgstr "" + +#: core/templates/core/driver_dashboard.html:77 +msgid "You haven't accepted any shipments yet." +msgstr "" + #: core/templates/core/index.html:10 msgid "Small Shipments," msgstr "" @@ -217,13 +293,10 @@ msgid "Track" msgstr "" #: core/templates/core/index.html:34 +#: core/templates/core/shipper_dashboard.html:24 msgid "From" msgstr "" -#: core/templates/core/index.html:35 -msgid "To" -msgstr "" - #: core/templates/core/index.html:42 msgid "Enter your 10-character tracking ID to see live updates." msgstr "" @@ -310,6 +383,54 @@ msgstr "" msgid "Login here" msgstr "" -#: core/views.py:17 +#: core/templates/core/shipment_request.html:10 +msgid "Request a Shipment" +msgstr "" + +#: core/templates/core/shipment_request.html:24 +msgid "Submit Request" +msgstr "" + +#: core/templates/core/shipper_dashboard.html:7 +msgid "My Shipments" +msgstr "" + +#: core/templates/core/shipper_dashboard.html:8 +msgid "New Shipment" +msgstr "" + +#: core/templates/core/shipper_dashboard.html:28 +msgid "Waiting for pickup" +msgstr "" + +#: core/templates/core/shipper_dashboard.html:36 +msgid "You haven't sent any shipments yet." +msgstr "" + +#: core/templates/core/shipper_dashboard.html:37 +msgid "Send your first shipment" +msgstr "" + +#: core/views.py:18 msgid "Parcel not found." msgstr "" + +#: core/views.py:55 +msgid "Only shippers can request shipments." +msgstr "" + +#: core/views.py:64 +msgid "Shipment requested successfully! Tracking ID: " +msgstr "" + +#: core/views.py:73 +msgid "Only car owners can accept shipments." +msgstr "" + +#: core/views.py:80 +msgid "You have accepted the shipment!" +msgstr "" + +#: core/views.py:91 +msgid "Status updated successfully!" +msgstr ""