Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export const MapControlButtons = ({
onChange={handleFileSelect}
/>

<div class="m-4 mb-3 px-3 py-2 bg-white rounded shadow-sm" style={{textAlign: 'center', lineHeight: 'normal'}}>
<strong class="text-muted d-flex align-items-center gap-2 text-red-500">
{t('field_alert')}
</strong>
</div>

{/* TIFF Info Display */}
{tiffFile && (
<div className="mb-3 px-3 py-2 bg-white rounded shadow-sm">
Expand Down
28 changes: 15 additions & 13 deletions src/farmtech/client/js/locales/en/inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@
"remove_tiff": "Remove TIFF",
"draw_polygon": "Draw Polygon",
"analyze": "Analyze",
"invalid_file_type": "Please select a valid TIFF file",
"invalid_file_type": "Select a valid TIFF file",
"select_date_range": "Select Date Range for Analysis",
"start_date": "Start Date",
"end_date": "End Date",
"date_required": "Both dates are required",
"invalid_date_range": "Start date must be before end date",
"invalid_date_range": "The start date must be earlier than the end date",
"warning": "Warning:",
"cloud_warning": "If cloud coverage exceeds 20% or there are satellite passage issues in the selected date range, we recommend using a date range at least 70 days before the estimated harvest.",
"cloud_warning": "If cloud cover exceeds 20% or there are satellite pass issues within the selected date range, it is recommended to use a date range of at least 70 days before the estimated harvest.",
"cancel": "Cancel",
"confirm_analysis": "Confirm Analysis",
"tiff_analysis_info": "TIFF Analysis Information",
"date_range_recommendation": "Date Range Recommendation",
"drone_imagery_timing": "For optimal analysis results, drone imagery should be captured within a date range of 10 to 30 days.",
"tiff_assumption": "We assume the uploaded TIFF was obtained from drone imagery captured within an appropriate date range.",
"tiff_assumption": "It is assumed that the uploaded TIFF was obtained from drone imagery captured within an appropriate date range.",
"important_notice": "Important Notice:",
"analysis_validity_warning": "Analysis results may not be valid if the drone imagery was captured outside the recommended date range. Additionally, if cloud coverage exceeds 20% or there are other environmental factors during capture, we recommend using imagery from at least 70 days before the estimated harvest date.",
"analysis_validity_warning": "Analysis results may not be valid if drone images were captured outside the recommended date range. Additionally, if cloud cover exceeds 20% or other environmental factors occurred during capture, it is recommended to use imagery from at least 70 days before the estimated harvest date.",
"understand_proceed": "I Understand, Proceed",
"tutorial_title": "How to Use",
"tutorial_step1_title": "1. Draw or Upload",
"tutorial_step1_desc": "Draw a polygon on the map or upload a georeferenced TIFF file",
"tutorial_step2_title": "2. Select Dates",
"tutorial_step2_desc": "Choose the date range for analysis (recommended: 70 days before harvest)",
"tutorial_step3_title": "3. Analyze",
"tutorial_step3_desc": "Click 'Analyze' to get yield estimation in tons per hectare",
"help": "Help"
"help": "Help",
"section_usage_modes": "Usage Modes",
"usage_draw_polygon": "Draw a Polygon",
"usage_draw_polygon_desc": "Draw the land plot on the map using the interactive tool. The selected area will turn green and the analysis button will be enabled, but you will still be able to modify the polygon shape before confirming the analysis.",
"usage_upload_tiff": "Upload a TIFF File",
"usage_upload_tiff_desc": "If you have satellite or drone data, upload your TIFF file directly. The analysis button will be enabled after upload. To return to drawing or upload a new file, click the 'X'. Make sure the TIFF bands are in the following order: Blue, Green, Red, Near Red, NIR.",
"usage_ai_algorithm": "Tomato Yield Algorithm",
"usage_ai_algorithm_desc": "Our advanced algorithm extrapolates a tomato yield prediction from georeferenced data. The returned value is expressed in tons per hectare (t/ha).",
"analysis_error": "Error during analysis. Check the selected dates or verify that the TIFF contains the bands in the correct order: Blue, Green, Red, Near Red, NIR.",
"field_alert": "The algorithm produces reliable data only if the drawn field or the uploaded TIFF is used for tomato cultivation."
}
4 changes: 2 additions & 2 deletions src/farmtech/client/js/locales/it/inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"usage_upload_tiff_desc": "Se hai dati da satellite o drone, carica direttamente il tuo file TIFF. Il pulsante di analisi si abiliterà dopo il caricamento. Per tornare al disegno o caricare un nuovo file, clicca sulla 'X'. Verifica che le bande del TIFF siano nell'ordine: Blue, Green, Red, Near Red, NIR.",
"usage_ai_algorithm": "Algoritmo di resa del pomodoro",
"usage_ai_algorithm_desc": "Il nostro algoritmo avanzato estrapola una previsione di resa del pomodoro a partire da dati georeferenziati. Il dato restituito è espresso in tonnellate su ettaro t/ha.",
"analysis_error":"Errore durante l'analisi. Verifica le date selezionate o che il TIFF contenga le bande nell'ordine corretto: Blue, Green, Red, Near Red, NIR."

"analysis_error":"Errore durante l'analisi. Verifica le date selezionate o che il TIFF contenga le bande nell'ordine corretto: Blue, Green, Red, Near Red, NIR.",
"field_alert": "L'algoritmo produce dati attendibili solo nel caso in cui il campo disegnato o il tif inviato sono adibiti alla coltivazione del pomodoro"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ def handle(self, *args, **options):
azione_zootecnica_group = Group.objects.get(name="azione-zootecnica")

perm_view_res = Permission.objects.get(codename="view_resourcebase")
perm_view_perm = Permission.objects.get(codename="view_permission")
perm_download_res = Permission.objects.get(codename="download_resourcebase")
perm_add_res = Permission.objects.get(codename="add_resourcebase")
perm_uploader = Permission.objects.get(codename="uploader")
perm_viewer = Permission.objects.get(codename="viewer")
perm_inference = Permission.objects.get(codename="inference")
perm_request = Permission.objects.get(codename="can_request_permissions")

anonymous_group.permissions.add(perm_view_res, perm_viewer)
anonymous_group.permissions.add(perm_view_res, perm_viewer, perm_view_perm)
self.stdout.write(
self.style.SUCCESS(
f"Added permissions to group: {anonymous_group.name}"
Expand Down