loko/streetup/mobile/urls.py

65 lines
No EOL
5.5 KiB
Python

from django.urls import path
from . import views
from interventions.views import interventions_index_mobile, intervention_detail_mobile, add_repair_intervention_mobile, choose_maintain_type_for_intervention_mobile, choose_thematic_for_intervention_mobile, add_intervention_mobile, interventions_add
from controls.views import controls_index, controls_detail, change_remark, change_control, change_template
from projects.views import projects_index, projects_detail
from observations.views import observations_index_mobile, observation_detail, observation_add
from assets.views.core import mobile_asset_detail
from assets.views import inspections
from notifications.views import inbox_mobile
app_name = "mobile"
urlpatterns = [
path("", views.index, name="mobile_index"),
path("install/", views.install, name="mobile_install"),
path("interventions/", interventions_index_mobile, name='interventions_index_mobile'),
path("interventions/add-repair/", add_repair_intervention_mobile, name='add_repair_intervention_mobile'),
path("interventions/add/", choose_maintain_type_for_intervention_mobile, name='choose_maintain_type_for_intervention_mobile'),
path("interventions/add/thematic/", choose_thematic_for_intervention_mobile, name='choose_thematic_for_intervention_mobile'),
path("interventions/add/<str:thematic_code>/", add_intervention_mobile, name='add_intervention_mobile'),
path("interventions/<str:thematic_code>/add-mobile/", interventions_add, name='intervention_add_mobile_form'),
path('interventions/<int:intervention_id>/', intervention_detail_mobile, name='intervention_detail_mobile'),
path("controls/", controls_index, name='controls_index'),
path('controls/service-worker.js', views.mobile_controls_service_worker, name='mobile_controls_service_worker'),
path('controls/<int:control_id>/', controls_detail, name='controls_detail'),
path('controls/<int:control_id>/change/', change_control, name='change_control'),
path('controls/remark/<int:remark_id>/change/', change_remark, name='change_remark'),
path('controls/template/<int:template_id>/change/', change_template, name='change_template'),
path("projects/", projects_index, name='projects_index'),
path('projects/<int:project_id>/', projects_detail, name='projects_detail'),
path("observations/", observations_index_mobile, name='observations_index_mobile'),
path('observations/add/', observation_add, name='observation_add_mobile'),
path('observations/<int:observation_id>/', observation_detail, name='observation_detail_mobile'),
path('observations/<int:observation_id>/edit/', observation_add, name='observation_edit_mobile'),
path("notifications/", inbox_mobile, name='notifications_mobile'),
path("nature/green-surfaces/", views.green_surfaces_edit_mobile, name='green_surfaces_edit_mobile'),
path("nature/green-surfaces-custom-draw/", views.green_surfaces_edit_custom_draw, name='green_surfaces_edit_custom_draw'),
path("nature/green-surfaces-standalone/", views.green_surfaces_edit_standalone, name='green_surfaces_edit_standalone'),
path('assets/<str:thematic_code>/<str:asset_model>/<int:asset_id>/', mobile_asset_detail, name='mobile_asset_detail'),
path('inspections/', inspections.inspections_list, name='inspections_list_mobile'),
path('inspections/new/', inspections.quick_inspection_map, name='quick_inspection_map_mobile'),
# Stock mobile
path("stock/", views.stock_index_mobile, name='stock_index_mobile'),
path("stock/products/", views.stock_products_mobile, name='stock_products_mobile'),
path("stock/products/<int:product_id>/", views.stock_product_detail_mobile, name='stock_product_detail_mobile'),
path("stock/serialized/<int:pk>/", views.stock_serialized_item_detail_mobile, name='stock_serialized_item_detail_mobile'),
path("stock/preparation-orders/", views.stock_preparation_orders_mobile, name='stock_preparation_orders_mobile'),
path("stock/preparation-orders/<int:pk>/", views.stock_preparation_order_detail_mobile, name='stock_preparation_order_detail_mobile'),
path("stock/production/", views.stock_production_orders_mobile, name='stock_production_orders_mobile'),
path("stock/production/new/", views.production_order_create_mobile, name='production_order_create_mobile'),
path("stock/production/<int:pk>/", views.stock_production_order_detail_mobile, name='stock_production_order_detail_mobile'),
path("stock/movements/", views.stock_movements_mobile, name='stock_movements_mobile'),
path("stock/movements/entry/", views.new_stock_entry_mobile, name='new_stock_entry_mobile'),
path("stock/movements/exit/", views.new_stock_exit_mobile, name='new_stock_exit_mobile'),
path("stock/movements/transfer/", views.new_stock_transfer_mobile, name='new_stock_transfer_mobile'),
path("stock/movements/<int:batch_id>/", views.stock_movement_batch_detail_mobile, name='stock_movement_batch_detail_mobile'),
path("stock/inventories/", views.stock_inventories_mobile, name='stock_inventories_mobile'),
path("stock/inventories/new/", views.stock_new_inventory_mobile, name='stock_new_inventory_mobile'),
path("stock/inventories/<int:pk>/", views.stock_inventory_detail_mobile, name='stock_inventory_detail_mobile'),
path("stock/purchases/", views.stock_purchases_mobile, name='stock_purchases_mobile'),
path("stock/purchases/<int:pk>/", views.stock_purchase_order_detail_mobile, name='stock_purchase_order_detail_mobile'),
# QR Code scanner
path("qr-scanner/", views.qr_scanner, name='qr_scanner'),
path("qr-resolve/", views.qr_resolve, name='qr_resolve'),
]