diff --git a/boranga/components/occurrence/api.py b/boranga/components/occurrence/api.py
index 8e21845f..37e50a5c 100644
--- a/boranga/components/occurrence/api.py
+++ b/boranga/components/occurrence/api.py
@@ -236,46 +236,16 @@ def get_date(filter_date):
if filter_submitted_to_date and not filter_submitted_from_date:
queryset = queryset.filter(reported_date__lte=filter_submitted_to_date)
- filter_from_effective_from_date = request.GET.get(
- "filter_from_effective_from_date"
- )
- filter_to_effective_from_date = request.GET.get(
- "filter_to_effective_from_date"
- )
-
- filter_from_effective_to_date = request.GET.get(
- "filter_from_effective_to_date"
- )
- filter_to_effective_to_date = request.GET.get("filter_to_effective_to_date")
-
- if filter_from_effective_from_date:
- queryset = queryset.filter(
- effective_from__gte=filter_from_effective_from_date
- )
- if filter_to_effective_from_date:
- queryset = queryset.filter(
- effective_from__lte=filter_to_effective_from_date
- )
-
- if filter_from_effective_to_date:
- queryset = queryset.filter(
- effective_to__gte=filter_from_effective_to_date
- )
- if filter_to_effective_to_date:
- queryset = queryset.filter(
- effective_to__lte=filter_to_effective_to_date
- )
-
- filter_from_review_due_date = request.GET.get("filter_from_review_due_date")
- filter_to_review_due_date = request.GET.get("filter_to_review_due_date")
+ filter_from_observation_date = request.GET.get("filter_observation_from_date")
+ filter_to_observation_date = request.GET.get("filter_observation_to_date")
- if filter_from_review_due_date:
+ if filter_from_observation_date:
queryset = queryset.filter(
- review_due_date__gte=filter_from_review_due_date
+ observation_date__gte=filter_from_observation_date
)
- if filter_to_review_due_date:
+ if filter_to_observation_date:
queryset = queryset.filter(
- review_due_date__lte=filter_to_review_due_date
+ observation_date__lte=filter_to_observation_date
)
else:
@@ -308,7 +278,19 @@ def get_date(filter_date):
if len(ordering):
queryset = queryset.order_by(*ordering)
- queryset = super().filter_queryset(request, queryset, view)
+ search_text = request.GET.get('search[value]')
+ search_queryset = queryset
+ #for search values that cannot be accommodated by DRF
+ if search_text:
+ if "internal" in view.name:
+ observer_ids = OCRObserverDetail.objects.filter(main_observer=True).filter(observer_name__icontains=search_text).values_list("occurrence_report__id", flat=True)
+ search_queryset = queryset.filter(
+ Q(submitter_information__name__icontains=search_text) |
+ Q(id__in=observer_ids)
+ )
+
+ super_queryset = super().filter_queryset(request, queryset, view)
+ queryset = search_queryset.union(super_queryset)
setattr(view, "_datatables_total_count", total_count)
return queryset
@@ -2936,28 +2918,6 @@ def filter_queryset(self, request, queryset, view):
if filter_status and not filter_status.lower() == "all":
queryset = queryset.filter(processing_status=filter_status)
- filter_from_effective_from_date = request.GET.get(
- "filter_from_effective_from_date"
- )
- filter_to_effective_from_date = request.GET.get("filter_to_effective_from_date")
-
- filter_from_effective_to_date = request.GET.get("filter_from_effective_to_date")
- filter_to_effective_to_date = request.GET.get("filter_to_effective_to_date")
-
- if filter_from_effective_from_date:
- queryset = queryset.filter(
- effective_from__gte=filter_from_effective_from_date
- )
- if filter_to_effective_from_date:
- queryset = queryset.filter(
- effective_from__lte=filter_to_effective_from_date
- )
-
- if filter_from_effective_to_date:
- queryset = queryset.filter(effective_to__gte=filter_from_effective_to_date)
- if filter_to_effective_to_date:
- queryset = queryset.filter(effective_to__lte=filter_to_effective_to_date)
-
filter_from_review_due_date = request.GET.get("filter_from_review_due_date")
filter_to_review_due_date = request.GET.get("filter_to_review_due_date")
diff --git a/boranga/components/occurrence/filters.py b/boranga/components/occurrence/filters.py
index fd06efe2..3abe1321 100644
--- a/boranga/components/occurrence/filters.py
+++ b/boranga/components/occurrence/filters.py
@@ -70,32 +70,6 @@ def get_date(filter_date):
occurrence_report__reported_date__lte=filter_submitted_to_date
)
- filter_from_effective_from_date = request.GET.get(
- "filter_from_effective_from_date"
- )
- filter_to_effective_from_date = request.GET.get("filter_to_effective_from_date")
-
- filter_from_effective_to_date = request.GET.get("filter_from_effective_to_date")
- filter_to_effective_to_date = request.GET.get("filter_to_effective_to_date")
-
- if filter_from_effective_from_date:
- queryset = queryset.filter(
- occurrence_report__effective_from__gte=filter_from_effective_from_date
- )
- if filter_to_effective_from_date:
- queryset = queryset.filter(
- occurrence_report__effective_from__lte=filter_to_effective_from_date
- )
-
- if filter_from_effective_to_date:
- queryset = queryset.filter(
- occurrence_report__effective_to__gte=filter_from_effective_to_date
- )
- if filter_to_effective_to_date:
- queryset = queryset.filter(
- occurrence_report__effective_to__lte=filter_to_effective_to_date
- )
-
filter_from_review_due_date = request.GET.get("filter_from_review_due_date")
filter_to_review_due_date = request.GET.get("filter_to_review_due_date")
diff --git a/boranga/components/occurrence/models.py b/boranga/components/occurrence/models.py
index ea31bfc4..29ee4705 100644
--- a/boranga/components/occurrence/models.py
+++ b/boranga/components/occurrence/models.py
@@ -194,12 +194,6 @@ class OccurrenceReport(SubmitterInformationModelMixin, RevisionedMixin):
PROCESSING_STATUS_CLOSED,
]
- REVIEW_STATUS_CHOICES = (
- ("not_reviewed", "Not Reviewed"),
- ("awaiting_amendments", "Awaiting Amendments"),
- ("amended", "Amended"),
- ("accepted", "Accepted"),
- )
customer_status = models.CharField(
"Customer Status",
max_length=40,
@@ -262,8 +256,6 @@ class OccurrenceReport(SubmitterInformationModelMixin, RevisionedMixin):
observation_date = models.DateTimeField(null=True, blank=True)
reported_date = models.DateTimeField(auto_now_add=True, null=False, blank=False)
- effective_from = models.DateTimeField(null=True, blank=True)
- effective_to = models.DateTimeField(null=True, blank=True)
submitter_information = models.OneToOneField(
SubmitterInformation,
on_delete=models.SET_NULL,
@@ -289,16 +281,6 @@ class OccurrenceReport(SubmitterInformationModelMixin, RevisionedMixin):
)
prev_processing_status = models.CharField(max_length=30, blank=True, null=True)
- review_due_date = models.DateField(null=True, blank=True)
- review_date = models.DateField(null=True, blank=True)
- reviewed_by = models.IntegerField(null=True) # EmailUserRO
- review_status = models.CharField(
- "Review Status",
- max_length=30,
- choices=REVIEW_STATUS_CHOICES,
- default=REVIEW_STATUS_CHOICES[0][0],
- )
-
proposed_decline_status = models.BooleanField(default=False)
deficiency_data = models.TextField(null=True, blank=True) # deficiency comment
assessor_data = models.TextField(null=True, blank=True) # assessor comment
@@ -770,20 +752,25 @@ def propose_approve(self, request, validated_data):
except Occurrence.DoesNotExist:
raise ValidationError(
f"Occurrence with id {occurrence_id} does not exist"
- )
-
+ )
+
details = validated_data.get("details", None)
new_occurrence_name = validated_data.get("new_occurrence_name", None)
- effective_from_date = validated_data.get("effective_from_date")
- effective_to_date = validated_data.get("effective_to_date")
+
+ if (new_occurrence_name and
+ Occurrence.objects.filter(occurrence_name=new_occurrence_name).exists() or
+ OccurrenceReportApprovalDetails.objects.filter(new_occurrence_name=new_occurrence_name).exists()):
+ raise ValidationError(
+ f"Occurrence with name \"{new_occurrence_name}\" already exists or has been proposed for approval"
+ )
+
+
OccurrenceReportApprovalDetails.objects.update_or_create(
occurrence_report=self,
defaults={
"officer": request.user.id,
"occurrence": occurrence,
"new_occurrence_name": new_occurrence_name,
- "effective_from_date": effective_from_date,
- "effective_to_date": effective_to_date,
"details": details,
},
)
@@ -1001,8 +988,6 @@ class OccurrenceReportApprovalDetails(models.Model):
) # If being added to an existing occurrence
new_occurrence_name = models.CharField(max_length=200, null=True, blank=True)
officer = models.IntegerField() # EmailUserRO
- effective_from_date = models.DateField(null=True, blank=True)
- effective_to_date = models.DateField(null=True, blank=True)
details = models.TextField(blank=True)
class Meta:
@@ -2809,6 +2794,13 @@ def get_queryset(self):
class Occurrence(RevisionedMixin):
+ REVIEW_STATUS_CHOICES = (
+ ("not_reviewed", "Not Reviewed"),
+ ("awaiting_amendments", "Awaiting Amendments"),
+ ("amended", "Amended"),
+ ("accepted", "Accepted"),
+ )
+
RELATED_ITEM_CHOICES = [
("species", "Species"),
("community", "Community"),
@@ -2838,8 +2830,7 @@ class Occurrence(RevisionedMixin):
blank=True,
related_name="occurrences",
)
- effective_from = models.DateTimeField(null=True, blank=True)
- effective_to = models.DateTimeField(null=True, blank=True)
+
submitter = models.IntegerField(null=True) # EmailUserRO
wild_status = models.ForeignKey(
WildStatus, on_delete=models.PROTECT, null=True, blank=True
@@ -2856,8 +2847,8 @@ class Occurrence(RevisionedMixin):
review_status = models.CharField(
"Review Status",
max_length=30,
- choices=OccurrenceReport.REVIEW_STATUS_CHOICES,
- default=OccurrenceReport.REVIEW_STATUS_CHOICES[0][0],
+ choices=REVIEW_STATUS_CHOICES,
+ default=REVIEW_STATUS_CHOICES[0][0],
)
created_date = models.DateTimeField(auto_now_add=True, null=False, blank=False)
@@ -3072,14 +3063,6 @@ def clone_from_occurrence_report(self, occurrence_report):
occurrence.species = occurrence_report.species
occurrence.community = occurrence_report.community
- occurrence.effective_from = occurrence_report.effective_from
- occurrence.effective_to = occurrence_report.effective_to
-
- occurrence.review_due_date = occurrence_report.review_due_date
- occurrence.review_date = occurrence_report.review_date
- occurrence.reviewed_by = occurrence_report.reviewed_by
- occurrence.review_status = occurrence_report.review_status
-
occurrence.save(no_revision=True)
# Clone all the associated models
diff --git a/boranga/components/occurrence/serializers.py b/boranga/components/occurrence/serializers.py
index 4bdda352..743fe48d 100644
--- a/boranga/components/occurrence/serializers.py
+++ b/boranga/components/occurrence/serializers.py
@@ -62,6 +62,7 @@
is_occurrence_assessor,
)
from boranga.ledger_api_utils import retrieve_email_user
+from boranga.components.users.serializers import SubmitterInformationSerializer
logger = logging.getLogger("boranga")
@@ -195,6 +196,10 @@ class ListOccurrenceReportSerializer(serializers.ModelSerializer):
scientific_name = serializers.SerializerMethodField()
community_name = serializers.SerializerMethodField()
customer_status = serializers.CharField(source="get_customer_status_display")
+ observation_date = serializers.DateTimeField(
+ format="%Y-%m-%d %H:%M:%S", allow_null=True
+ )
+ main_observer = serializers.SerializerMethodField()
class Meta:
model = OccurrenceReport
@@ -208,6 +213,8 @@ class Meta:
"customer_status",
"can_user_view",
"can_user_edit",
+ "observation_date",
+ "main_observer",
)
datatables_always_serialize = (
"id",
@@ -240,6 +247,15 @@ def get_community_name(self, obj):
except CommunityTaxonomy.DoesNotExist:
return ""
return ""
+
+ def get_main_observer(self, obj):
+ try:
+ if obj.observer_detail.filter(main_observer=True).exists():
+ return obj.observer_detail.filter(main_observer=True).first().observer_name
+ else:
+ return ""
+ except:
+ return ""
class ListInternalOccurrenceReportSerializer(serializers.ModelSerializer):
@@ -250,13 +266,6 @@ class ListInternalOccurrenceReportSerializer(serializers.ModelSerializer):
source="get_processing_status_display"
)
reported_date = serializers.DateTimeField(format="%Y-%m-%d %H:%M:%S")
- effective_from = serializers.DateTimeField(
- format="%Y-%m-%d %H:%M:%S", allow_null=True
- )
- effective_to = serializers.DateTimeField(
- format="%Y-%m-%d %H:%M:%S", allow_null=True
- )
- review_due_date = serializers.DateField(format="%Y-%m-%d", allow_null=True)
reported_date = serializers.DateTimeField(format="%Y-%m-%d %H:%M:%S")
assessor_edit = serializers.SerializerMethodField(read_only=True)
internal_user_edit = serializers.SerializerMethodField()
@@ -272,6 +281,7 @@ class ListInternalOccurrenceReportSerializer(serializers.ModelSerializer):
)
location_accuracy = serializers.SerializerMethodField()
identification_certainty = serializers.SerializerMethodField()
+ main_observer = serializers.SerializerMethodField()
class Meta:
model = OccurrenceReport
@@ -295,14 +305,12 @@ class Meta:
"internal_user_edit",
"occurrence",
"occurrence_name",
- "effective_from",
- "effective_to",
- "review_due_date",
"is_new_contributor",
"observation_date",
"location_accuracy",
"identification_certainty",
"site",
+ "main_observer",
)
datatables_always_serialize = (
"id",
@@ -381,6 +389,15 @@ def get_location_accuracy(self, obj):
def get_identification_certainty(self, obj):
if obj.identification and obj.identification.identification_certainty:
return obj.identification.identification_certainty.name
+
+ def get_main_observer(self, obj):
+ try:
+ if obj.observer_detail.filter(main_observer=True).exists():
+ return obj.observer_detail.filter(main_observer=True).first().observer_name
+ else:
+ return ""
+ except:
+ return ""
class OCRHabitatCompositionSerializer(serializers.ModelSerializer):
@@ -780,12 +797,6 @@ class ListOccurrenceSerializer(OccurrenceSerializer):
processing_status_display = serializers.CharField(
source="get_processing_status_display"
)
- effective_from = serializers.DateTimeField(
- format="%Y-%m-%d %H:%M:%S", allow_null=True
- )
- effective_to = serializers.DateTimeField(
- format="%Y-%m-%d %H:%M:%S", allow_null=True
- )
review_due_date = serializers.DateField(format="%Y-%m-%d", allow_null=True)
community_number = serializers.SerializerMethodField()
community_name = serializers.SerializerMethodField()
@@ -809,8 +820,6 @@ class Meta:
"number_of_reports",
"processing_status",
"processing_status_display",
- "effective_from",
- "effective_to",
"review_due_date",
"can_user_edit",
)
@@ -891,6 +900,7 @@ class BaseOccurrenceReportSerializer(serializers.ModelSerializer):
format="%Y-%m-%d %H:%M:%S", required=False, allow_null=True
)
observation_date = serializers.DateTimeField(format="%Y-%m-%d %H:%M:%S")
+ submitter_information = SubmitterInformationSerializer()
class Meta:
model = OccurrenceReport
@@ -910,7 +920,6 @@ class Meta:
# 'assigned_officer',
"customer_status",
"processing_status",
- "review_status",
"readonly",
"can_user_edit",
"can_user_view",
@@ -936,6 +945,7 @@ class Meta:
"occurrence",
"observation_date",
"site",
+ "submitter_information",
)
def get_readonly(self, obj):
@@ -947,9 +957,6 @@ def get_group_type(self, obj):
def get_processing_status(self, obj):
return obj.get_processing_status_display()
- def get_review_status(self, obj):
- return obj.get_review_status_display()
-
def get_customer_status(self, obj):
return obj.get_customer_status_display()
@@ -1033,7 +1040,6 @@ def get_model_name(self, obj):
class OccurrenceReportSerializer(BaseOccurrenceReportSerializer):
submitter = serializers.SerializerMethodField(read_only=True)
processing_status = serializers.SerializerMethodField(read_only=True)
- review_status = serializers.SerializerMethodField(read_only=True)
customer_status = serializers.SerializerMethodField(read_only=True)
def get_readonly(self, obj):
@@ -1111,13 +1117,6 @@ class OccurrenceReportReferralSerializer(serializers.ModelSerializer):
source="occurrence_report.reported_date", format="%Y-%m-%d %H:%M:%S"
)
submitter = serializers.SerializerMethodField()
- effective_from = serializers.DateTimeField(
- format="%Y-%m-%d %H:%M:%S", allow_null=True
- )
- effective_to = serializers.DateTimeField(
- format="%Y-%m-%d %H:%M:%S", allow_null=True
- )
- review_due_date = serializers.DateField(format="%Y-%m-%d", allow_null=True)
group_type = serializers.CharField(
source="occurrence_report.group_type.name", allow_null=True
)
@@ -1182,6 +1181,7 @@ class InternalOccurrenceReportSerializer(OccurrenceReportSerializer):
)
readonly = serializers.SerializerMethodField(read_only=True)
is_new_contributor = serializers.SerializerMethodField()
+ submitter_information = SubmitterInformationSerializer()
class Meta:
model = OccurrenceReport
@@ -1201,7 +1201,6 @@ class Meta:
"assigned_officer",
"customer_status",
"processing_status",
- "review_status",
"readonly",
"can_user_edit",
"can_user_view",
@@ -1240,6 +1239,7 @@ class Meta:
"is_new_contributor",
"observation_date",
"site",
+ "submitter_information",
)
def get_readonly(self, obj):
@@ -2083,8 +2083,6 @@ class BackToAssessorSerializer(serializers.Serializer):
class ProposeApproveSerializer(serializers.Serializer):
occurrence_id = serializers.IntegerField(allow_null=True)
new_occurrence_name = serializers.CharField(allow_blank=True)
- effective_from_date = serializers.DateField()
- effective_to_date = serializers.DateField()
details = serializers.CharField()
diff --git a/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.html b/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.html
index b8508b67..a528017f 100644
--- a/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.html
+++ b/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.html
@@ -14,8 +14,6 @@
Create a new Occurrence: {{ approval_details.new_occurrence_name }}
{% endif %}
- Effective from: {{ approval_details.effective_from_date }}
- Effective to: {{ approval_details.effective_to_date }}
Details: {{ approval_details.details }}
diff --git a/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.txt b/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.txt
index 5ff09ba1..7446efd0 100644
--- a/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.txt
+++ b/boranga/components/occurrence/templates/boranga/emails/ocr_proposals/send_approver_approve_notification.txt
@@ -5,8 +5,6 @@
Recommendation: Approve
Create New or Add to Existing Occurrence?: {% if approval_details.occurrence %}Add to Existing Occurrence: {{ approval_details.occurrence.occurrence_number }} - {{ approval_details.occurrence.occurrence_name }}{% else %}Create a new Occurrence: {{ approval_details.new_occurrence_name }}{% endif %}
- Effective from: {{ approval_details.effective_from_date }}
- Effective to: {{ approval_details.effective_to_date }}
Details: {{ approval_details.details }}
You can access this Occurrence Report using the following link:
diff --git a/boranga/frontend/boranga/src/components/common/occurrence/contact_datatable.vue b/boranga/frontend/boranga/src/components/common/occurrence/contact_datatable.vue
index 97205c4b..05efd537 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence/contact_datatable.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence/contact_datatable.vue
@@ -121,9 +121,13 @@ export default {
searchable: true,
mRender: function (data, type, full) {
if (full.visible) {
- return full.contact;
+ let value = full.contact;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
} else {
- return '' + full.contact + ''
+ let value = full.contact;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return '' + type == 'export' ? value : result + ''
}
},
},
diff --git a/boranga/frontend/boranga/src/components/common/occurrence/observer_datatable.vue b/boranga/frontend/boranga/src/components/common/occurrence/observer_datatable.vue
index 6454bef6..46a3d999 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence/observer_datatable.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence/observer_datatable.vue
@@ -121,9 +121,13 @@ export default {
searchable: true,
mRender: function (data, type, full) {
if (full.visible) {
- return full.contact;
+ let value = full.contact;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
} else {
- return '' + full.contact + ''
+ let value = full.contact;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return '' + type == 'export' ? value : result + ''
}
},
},
diff --git a/boranga/frontend/boranga/src/components/common/occurrence/occurrence_report_profile.vue b/boranga/frontend/boranga/src/components/common/occurrence/occurrence_report_profile.vue
index d8d160ab..4bf294dd 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence/occurrence_report_profile.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence/occurrence_report_profile.vue
@@ -149,9 +149,9 @@ export default {
return {
uuid: null,
scientific_name_lookup:
- 'scientific_name_lookup' + vm.occurrence_report_obj.id,
+ 'scientific_name_lookup' + vm._uid,
select_scientific_name:
- 'select_scientific_name' + vm.occurrence_report_obj.id,
+ 'select_scientific_name' + vm._uid,
community_name_lookup: 'community_name_lookup' + vm._uid,
select_community_name: 'select_community_name' + vm._uid,
isFauna:
diff --git a/boranga/frontend/boranga/src/components/common/occurrence/species_occurrence.vue b/boranga/frontend/boranga/src/components/common/occurrence/species_occurrence.vue
index c882020b..4b194b80 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence/species_occurrence.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence/species_occurrence.vue
@@ -75,12 +75,12 @@ export default {
data: function () {
let vm = this;
return {
- scientific_name_lookup: 'scientific_name_lookup' + vm.occurrence_obj.id,
- select_scientific_name: "select_scientific_name" + vm.occurrence_obj.id,
- occurrence_source_lookup: 'occurrence_source_lookup' + vm.occurrence_obj.id,
- select_occurrence_source: "select_occurrence_source" + vm.occurrence_obj.id,
- wild_status_lookup: 'wild_status_lookup' + vm.occurrence_obj.id,
- select_wild_status: "select_wild_status" + vm.occurrence_obj.id,
+ scientific_name_lookup: 'scientific_name_lookup' + vm._uid,
+ select_scientific_name: "select_scientific_name" + vm._uid,
+ occurrence_source_lookup: 'occurrence_source_lookup' + vm._uid,
+ select_occurrence_source: "select_occurrence_source" + vm._uid,
+ wild_status_lookup: 'wild_status_lookup' + vm._uid,
+ select_wild_status: "select_wild_status" + vm._uid,
common_name: null,
occ_profile_dict: {},
species_list: [],
diff --git a/boranga/frontend/boranga/src/components/common/occurrence_community_dashboard.vue b/boranga/frontend/boranga/src/components/common/occurrence_community_dashboard.vue
index 3efa7c1c..1167c8fd 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence_community_dashboard.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence_community_dashboard.vue
@@ -29,47 +29,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -153,26 +112,6 @@ export default {
required: false,
default: 'filterOCCCommunityStatus',
},
- filterOCCFromCommunityEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCFromCommunityEffectiveFromDate',
- },
- filterOCCToCommunityEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCToCommunityEffectiveFromDate',
- },
- filterOCCFromCommunityEffectiveToDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCFromCommunityEffectiveToDate',
- },
- filterOCCToCommunityEffectiveToDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCToCommunityEffectiveToDate',
- },
filterOCCFromCommunityDueDate_cache: {
type: String,
required: false,
@@ -201,16 +140,6 @@ export default {
filterOCCCommunityStatus: sessionStorage.getItem(this.filterOCCCommunityStatus_cache) ?
sessionStorage.getItem(this.filterOCCCommunityStatus_cache) : 'all',
- filterOCCFromCommunityEffectiveFromDate: sessionStorage.getItem(this.filterOCCFromCommunityEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCCFromCommunityEffectiveFromDate_cache) : '',
- filterOCCToCommunityEffectiveFromDate: sessionStorage.getItem(this.filterOCCToCommunityEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCCToCommunityEffectiveFromDate_cache) : '',
-
- filterOCCFromCommunityEffectiveToDate: sessionStorage.getItem(this.filterOCCFromCommunityEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCCFromCommunityEffectiveToDate_cache) : '',
- filterOCCToCommunityEffectiveToDate: sessionStorage.getItem(this.filterOCCToCommunityEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCCToCommunityEffectiveToDate_cache) : '',
-
filterOCCFromCommunityDueDate: sessionStorage.getItem(this.filterOCCFromCommunityDueDate_cache) ?
sessionStorage.getItem(this.filterOCCFromCommunityDueDate_cache) : '',
filterOCCToCommunityDueDate: sessionStorage.getItem(this.filterOCCToCommunityDueDate_cache) ?
@@ -263,26 +192,6 @@ export default {
this.$refs.collapsible_filters.show_warning_icon(this.filterApplied)
}
},
- filterOCCFromCommunityEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.community_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCFromCommunityEffectiveFromDate_cache, vm.filterOCCFromCommunityEffectiveFromDate);
- },
- filterOCCToCommunityEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.community_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCToCommunityEffectiveFromDate_cache, vm.filterOCCToCommunityEffectiveFromDate);
- },
- filterOCCFromCommunityEffectiveToDate: function(){
- let vm = this;
- vm.$refs.community_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCFromCommunityEffectiveToDate_cache, vm.filterOCCFromCommunityEffectiveToDate);
- },
- filterOCCToCommunityEffectiveToDate: function(){
- let vm = this;
- vm.$refs.community_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCToCommunityEffectiveToDate_cache, vm.filterOCCToCommunityEffectiveToDate);
- },
filterOCCFromCommunityDueDate: function(){
let vm = this;
vm.$refs.community_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
@@ -302,10 +211,6 @@ export default {
if(this.filterOCCCommunityOccurrenceName === 'all' &&
this.filterOCCCommunityName === 'all' &&
this.filterOCCCommunityStatus === 'all' &&
- this.filterOCCFromCommunityEffectiveFromDate === '' &&
- this.filterOCCToCommunityEffectiveFromDate === '' &&
- this.filterOCCFromCommunityEffectiveToDate === '' &&
- this.filterOCCToCommunityEffectiveToDate === '' &&
this.filterOCCFromCommunityDueDate === '' &&
this.filterOCCToCommunityDueDate === ''){
return false
@@ -331,7 +236,7 @@ export default {
},
datatable_headers: function(){
if (this.is_internal){
- return ['Number','Name of Occurrence','Community Name', 'Wild Status', 'Number of Reports', 'Effective From', 'Effective To', 'Review Due', 'Status', 'Action']
+ return ['Number','Name of Occurrence','Community Name', 'Wild Status', 'Number of Reports', 'Review Due', 'Status', 'Action']
}
},
column_id: function(){
@@ -362,6 +267,14 @@ export default {
searchable: true,
visible: true,
name: "occurrence_name",
+ 'render': function (data, type, full) {
+ if (full.occurrence_name) {
+ let value = full.occurrence_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
+ }
+ return ''
+ },
}
},
column_community_name: function(){
@@ -370,6 +283,14 @@ export default {
orderable: true,
searchable: true,
visible: true,
+ 'render': function (data, type, full) {
+ if (full.community_name) {
+ let value = full.community_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
+ }
+ return ''
+ },
name: "community__taxonomy__community_name",
}
},
@@ -389,24 +310,6 @@ export default {
visible: true,
}
},
- column_effective_from: function(){
- return {
- data: "effective_from",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_from",
- }
- },
- column_effective_to: function(){
- return {
- data: "effective_to",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_to",
- }
- },
column_review_due_date: function(){
return {
data: "review_due_date",
@@ -477,8 +380,6 @@ export default {
vm.column_community_name,
vm.column_wild_status,
vm.column_number_of_reports,
- vm.column_effective_from,
- vm.column_effective_to,
vm.column_review_due_date,
vm.column_status,
vm.column_action,
@@ -514,10 +415,6 @@ export default {
d.filter_occurrence_name = vm.filterOCCCommunityOccurrenceName;
d.filter_community_name = vm.filterOCCCommunityName;
d.filter_status = vm.filterOCCCommunityStatus;
- d.filter_from_effective_from_date = vm.filterOCCFromCommunityEffectiveFromDate;
- d.filter_to_effective_from_date = vm.filterOCCToCommunityEffectiveFromDate;
- d.filter_from_effective_to_date = vm.filterOCCFromCommunityEffectiveToDate;
- d.filter_to_effective_to_date = vm.filterOCCToCommunityEffectiveToDate;
d.filter_from_due_date = vm.filterOCCFromCommunityDueDate;
d.filter_to_due_date = vm.filterOCCToCommunityDueDate;
d.is_internal = vm.is_internal;
@@ -797,10 +694,6 @@ export default {
filter_occurrence_name: vm.filterOCCCommunityOccurrenceName,
filter_community_name: vm.filterOCCCommunityName,
filter_status: vm.filterOCCCommunityStatus,
- filter_from_effective_from_date: vm.filterOCCFromCommunityEffectiveFromDate,
- filter_to_effective_from_date: vm.filterOCCToCommunityEffectiveFromDate,
- filter_from_effective_to_date: vm.filterOCCFromCommunityEffectiveToDate,
- filter_to_effective_to_date: vm.filterOCCToCommunityEffectiveToDate,
filter_from_due_date: vm.filterOCCFromCommunityDueDate,
filter_to_due_date: vm.filterOCCToCommunityDueDate,
is_internal: vm.is_internal,
diff --git a/boranga/frontend/boranga/src/components/common/occurrence_fauna_dashboard.vue b/boranga/frontend/boranga/src/components/common/occurrence_fauna_dashboard.vue
index 1e343544..d3509aa1 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence_fauna_dashboard.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence_fauna_dashboard.vue
@@ -29,48 +29,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -156,26 +114,6 @@ export default {
required: false,
default: 'filterOCCFaunaStatus',
},
- filterOCCFromFaunaEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCFromFaunaEffectiveFromDate',
- },
- filterOCCToFaunaEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCToFaunaEffectiveFromDate',
- },
- filterOCCFromFaunaEffectiveToDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCFromFaunaEffectiveToDate',
- },
- filterOCCToFaunaEffectiveToDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCToFaunaEffectiveToDate',
- },
filterOCCFromFaunaDueDate_cache: {
type: String,
required: false,
@@ -204,16 +142,6 @@ export default {
filterOCCFaunaStatus: sessionStorage.getItem(this.filterOCCFaunaStatus_cache) ?
sessionStorage.getItem(this.filterOCCFaunaStatus_cache) : 'all',
- filterOCCFromFaunaEffectiveFromDate: sessionStorage.getItem(this.filterOCCFromFaunaEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCCFromFaunaEffectiveFromDate_cache) : '',
- filterOCCToFaunaEffectiveFromDate: sessionStorage.getItem(this.filterOCCToFaunaEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCCToFaunaEffectiveFromDate_cache) : '',
-
- filterOCCFromFaunaEffectiveToDate: sessionStorage.getItem(this.filterOCCFromFaunaEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCCFromFaunaEffectiveToDate_cache) : '',
- filterOCCToFaunaEffectiveToDate: sessionStorage.getItem(this.filterOCCToFaunaEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCCToFaunaEffectiveToDate_cache) : '',
-
filterOCCFromFaunaDueDate: sessionStorage.getItem(this.filterOCCFromFaunaDueDate_cache) ?
sessionStorage.getItem(this.filterOCCFromFaunaDueDate_cache) : '',
filterOCCToFaunaDueDate: sessionStorage.getItem(this.filterOCCToFaunaDueDate_cache) ?
@@ -264,26 +192,6 @@ export default {
this.$refs.collapsible_filters.show_warning_icon(this.filterApplied)
}
},
- filterOCCFromFaunaEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.fauna_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCFromFaunaEffectiveFromDate_cache, vm.filterOCCFromFaunaEffectiveFromDate);
- },
- filterOCCToFaunaEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.fauna_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCToFaunaEffectiveFromDate_cache, vm.filterOCCToFaunaEffectiveFromDate);
- },
- filterOCCFromFaunaEffectiveToDate: function(){
- let vm = this;
- vm.$refs.fauna_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCFromFaunaEffectiveToDate_cache, vm.filterOCCFromFaunaEffectiveToDate);
- },
- filterOCCToFaunaEffectiveToDate: function(){
- let vm = this;
- vm.$refs.fauna_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCToFaunaEffectiveToDate_cache, vm.filterOCCToFaunaEffectiveToDate);
- },
filterOCCFromFaunaDueDate: function(){
let vm = this;
vm.$refs.fauna_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
@@ -303,10 +211,6 @@ export default {
if (this.filterOCCFaunaOccurrenceName === 'all' &&
this.filterOCCFaunaScientificName === 'all' &&
this.filterOCCFaunaStatus === 'all' &&
- this.filterOCCFromFaunaEffectiveFromDate === '' &&
- this.filterOCCToFaunaEffectiveFromDate === '' &&
- this.filterOCCFromFaunaEffectiveToDate === '' &&
- this.filterOCCToFaunaEffectiveToDate === '' &&
this.filterOCCFromFaunaDueDate === '' &&
this.filterOCCToFaunaDueDate === '') {
return false
@@ -329,7 +233,7 @@ export default {
},
datatable_headers: function () {
if (this.is_internal) {
- return ['Number', 'Name of Occurrence', 'Scientific Name', 'Wild Status', 'Number of Reports', 'Effective From', 'Effective To', 'Review Due', 'Status', 'Action']
+ return ['Number', 'Name of Occurrence', 'Scientific Name', 'Wild Status', 'Number of Reports', 'Review Due', 'Status', 'Action']
}
},
column_id: function () {
@@ -355,6 +259,14 @@ export default {
searchable: true,
visible: true,
name: "occurrence_name",
+ 'render': function (data, type, full) {
+ if (full.occurrence_name) {
+ let value = full.occurrence_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
+ }
+ return ''
+ },
}
},
column_scientific_name: function () {
@@ -363,6 +275,14 @@ export default {
orderable: true,
searchable: true,
visible: true,
+ 'render': function (data, type, full) {
+ if (full.scientific_name) {
+ let value = full.scientific_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
+ }
+ return ''
+ },
name: "species__taxonomy__scientific_name",
}
},
@@ -382,24 +302,6 @@ export default {
searchable: false,
}
},
- column_effective_from: function(){
- return {
- data: "effective_from",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_from",
- }
- },
- column_effective_to: function(){
- return {
- data: "effective_to",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_to",
- }
- },
column_review_due_date: function(){
return {
data: "review_due_date",
@@ -463,8 +365,6 @@ export default {
vm.column_scientific_name,
vm.column_wild_status,
vm.column_number_of_reports,
- vm.column_effective_from,
- vm.column_effective_to,
vm.column_review_due_date,
vm.column_status,
vm.column_action,
@@ -500,10 +400,6 @@ export default {
d.filter_occurrence_name = vm.filterOCCFaunaOccurrenceName;
d.filter_scientific_name = vm.filterOCCFaunaScientificName;
d.filter_status = vm.filterOCCFaunaStatus;
- d.filter_from_effective_from_date = vm.filterOCCFromFaunaEffectiveFromDate;
- d.filter_to_effective_from_date = vm.filterOCCToFaunaEffectiveFromDate;
- d.filter_from_effective_to_date = vm.filterOCCFromFaunaEffectiveToDate;
- d.filter_to_effective_to_date = vm.filterOCCToFaunaEffectiveToDate;
d.filter_from_due_date = vm.filterOCCFromFaunaDueDate;
d.filter_to_due_date = vm.filterOCCToFaunaDueDate;
d.is_internal = vm.is_internal;
@@ -780,10 +676,6 @@ export default {
filter_occurrence_name: vm.filterOCCFaunaOccurrenceName,
filter_scientific_name: vm.filterOCCFaunaScientificName,
filter_status: vm.filterOCCFaunaStatus,
- filter_from_effective_from_date: vm.filterOCCFromFaunaEffectiveFromDate,
- filter_to_effective_from_date: vm.filterOCCToFaunaEffectiveFromDate,
- filter_from_effective_to_date: vm.filterOCCFromFaunaEffectiveToDate,
- filter_to_effective_to_date: vm.filterOCCToFaunaEffectiveToDate,
filter_from_due_date: vm.filterOCCFromFaunaDueDate,
filter_to_due_date: vm.filterOCCToFaunaDueDate,
is_internal: vm.is_internal,
diff --git a/boranga/frontend/boranga/src/components/common/occurrence_flora_dashboard.vue b/boranga/frontend/boranga/src/components/common/occurrence_flora_dashboard.vue
index 60d28838..4dca0957 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence_flora_dashboard.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence_flora_dashboard.vue
@@ -29,48 +29,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -156,26 +114,6 @@ export default {
required: false,
default: 'filterOCCFloraStatus',
},
- filterOCCFromFloraEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCFromFloraEffectiveFromDate',
- },
- filterOCCToFloraEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCToFloraEffectiveFromDate',
- },
- filterOCCFromFloraEffectiveToDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCFromFloraEffectiveToDate',
- },
- filterOCCToFloraEffectiveToDate_cache: {
- type: String,
- required: false,
- default: 'filterOCCToFloraEffectiveToDate',
- },
filterOCCFromFloraDueDate_cache: {
type: String,
required: false,
@@ -204,16 +142,6 @@ export default {
filterOCCFloraStatus: sessionStorage.getItem(this.filterOCCFloraStatus_cache) ?
sessionStorage.getItem(this.filterOCCFloraStatus_cache) : 'all',
- filterOCCFromFloraEffectiveFromDate: sessionStorage.getItem(this.filterOCCFromFloraEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCCFromFloraEffectiveFromDate_cache) : '',
- filterOCCToFloraEffectiveFromDate: sessionStorage.getItem(this.filterOCCToFloraEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCCToFloraEffectiveFromDate_cache) : '',
-
- filterOCCFromFloraEffectiveToDate: sessionStorage.getItem(this.filterOCCFromFloraEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCCFromFloraEffectiveToDate_cache) : '',
- filterOCCToFloraEffectiveToDate: sessionStorage.getItem(this.filterOCCToFloraEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCCToFloraEffectiveToDate_cache) : '',
-
filterOCCFromFloraDueDate: sessionStorage.getItem(this.filterOCCFromFloraDueDate_cache) ?
sessionStorage.getItem(this.filterOCCFromFloraDueDate_cache) : '',
filterOCCToFloraDueDate: sessionStorage.getItem(this.filterOCCToFloraDueDate_cache) ?
@@ -264,26 +192,6 @@ export default {
this.$refs.collapsible_filters.show_warning_icon(this.filterApplied)
}
},
- filterOCCFromFloraEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.flora_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCFromFloraEffectiveFromDate_cache, vm.filterOCCFromFloraEffectiveFromDate);
- },
- filterOCCToFloraEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.flora_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCToFloraEffectiveFromDate_cache, vm.filterOCCToFloraEffectiveFromDate);
- },
- filterOCCFromFloraEffectiveToDate: function(){
- let vm = this;
- vm.$refs.flora_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCFromFloraEffectiveToDate_cache, vm.filterOCCFromFloraEffectiveToDate);
- },
- filterOCCToFloraEffectiveToDate: function(){
- let vm = this;
- vm.$refs.flora_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCCToFloraEffectiveToDate_cache, vm.filterOCCToFloraEffectiveToDate);
- },
filterOCCFromFloraDueDate: function(){
let vm = this;
vm.$refs.flora_occ_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
@@ -303,10 +211,6 @@ export default {
if (this.filterOCCFloraOccurrenceName === 'all' &&
this.filterOCCFloraScientificName === 'all' &&
this.filterOCCFloraStatus === 'all' &&
- this.filterOCCFromFloraEffectiveFromDate === '' &&
- this.filterOCCToFloraEffectiveFromDate === '' &&
- this.filterOCCFromFloraEffectiveToDate === '' &&
- this.filterOCCToFloraEffectiveToDate === '' &&
this.filterOCCFromFloraDueDate === '' &&
this.filterOCCToFloraDueDate === '') {
return false
@@ -329,7 +233,7 @@ export default {
},
datatable_headers: function () {
if (this.is_internal) {
- return ['Number', 'Name of Occurrrence', 'Scientific Name', 'Wild Status', 'Number of Reports', 'Effective From', 'Effective To', 'Review Due', 'Status', 'Action']
+ return ['Number', 'Name of Occurrrence', 'Scientific Name', 'Wild Status', 'Number of Reports', 'Review Due', 'Status', 'Action']
}
},
column_id: function () {
@@ -355,7 +259,15 @@ export default {
orderable: true,
searchable: true,
visible: true,
- name: "occurrence_name"
+ name: "occurrence_name",
+ 'render': function (data, type, full) {
+ if (full.occurrence_name) {
+ let value = full.occurrence_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
+ }
+ return ''
+ },
}
},
column_scientific_name: function () {
@@ -364,6 +276,14 @@ export default {
orderable: true,
searchable: true,
visible: true,
+ 'render': function (data, type, full) {
+ if (full.scientific_name) {
+ let value = full.scientific_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
+ }
+ return ''
+ },
name: "species__taxonomy__scientific_name",
}
},
@@ -383,24 +303,6 @@ export default {
searchable: false,
}
},
- column_effective_from: function(){
- return {
- data: "effective_from",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_from",
- }
- },
- column_effective_to: function(){
- return {
- data: "effective_to",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_to",
- }
- },
column_review_due_date: function(){
return {
data: "review_due_date",
@@ -464,8 +366,6 @@ export default {
vm.column_scientific_name,
vm.column_wild_status,
vm.column_number_of_reports,
- vm.column_effective_from,
- vm.column_effective_to,
vm.column_review_due_date,
vm.column_status,
vm.column_action,
@@ -501,10 +401,6 @@ export default {
d.filter_occurrence_name = vm.filterOCCFloraOccurrenceName;
d.filter_scientific_name = vm.filterOCCFloraScientificName;
d.filter_status = vm.filterOCCFloraStatus;
- d.filter_from_effective_from_date = vm.filterOCCFromFloraEffectiveFromDate;
- d.filter_to_effective_from_date = vm.filterOCCToFloraEffectiveFromDate;
- d.filter_from_effective_to_date = vm.filterOCCFromFloraEffectiveToDate;
- d.filter_to_effective_to_date = vm.filterOCCToFloraEffectiveToDate;
d.filter_from_due_date = vm.filterOCCFromFloraDueDate;
d.filter_to_due_date = vm.filterOCCToFloraDueDate;
d.is_internal = vm.is_internal;
@@ -778,10 +674,6 @@ methods: {
filter_occurrence_name: vm.filterOCCFloraOccurrenceName,
filter_scientific_name: vm.filterOCCFloraScientificName,
filter_status: vm.filterOCCFloraStatus,
- filter_from_effective_from_date: vm.filterOCCFromFloraEffectiveFromDate,
- filter_to_effective_from_date: vm.filterOCCToFloraEffectiveFromDate,
- filter_from_effective_to_date: vm.filterOCCFromFloraEffectiveToDate,
- filter_to_effective_to_date: vm.filterOCCToFloraEffectiveToDate,
filter_from_due_date: vm.filterOCCFromFloraDueDate,
filter_to_due_date: vm.filterOCCToFloraDueDate,
is_internal: vm.is_internal,
diff --git a/boranga/frontend/boranga/src/components/common/occurrence_report_community_dashboard.vue b/boranga/frontend/boranga/src/components/common/occurrence_report_community_dashboard.vue
index 25bb070c..1ddf715e 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence_report_community_dashboard.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence_report_community_dashboard.vue
@@ -31,59 +31,34 @@
-
-
-
-
-
-
-
-
-
+
-
+
-
-
+
-
-
@@ -167,35 +142,25 @@ export default {
required: false,
default: 'filterOCRCommunityStatus',
},
- filterOCRCommunitySubmittedFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCRCommunitySubmittedFromDate',
- },
- filterOCRCommunitySubmittedToDate_cache: {
- type: String,
- required: false,
- default: 'filterOCRCommunitySubmittedToDate',
- },
- filterOCRFromCommunityEffectiveFromDate_cache: {
+ filterOCRCommunityObservationFromDate_cache: {
type: String,
required: false,
- default: 'filterOCRFromCommunityEffectiveFromDate',
+ default: 'filterOCRCommunityObservationFromDate',
},
- filterOCRToCommunityEffectiveFromDate_cache: {
+ filterOCRCommunityObservationToDate_cache: {
type: String,
required: false,
- default: 'filterOCRToCommunityEffectiveFromDate',
+ default: 'filterOCRCommunityObservationToDate',
},
- filterOCRFromCommunityEffectiveToDate_cache: {
+ filterOCRCommunitySubmittedFromDate_cache: {
type: String,
required: false,
- default: 'filterOCRFromCommunityEffectiveToDate',
+ default: 'filterOCRCommunitySubmittedFromDate',
},
- filterOCRToCommunityEffectiveToDate_cache: {
+ filterOCRCommunitySubmittedToDate_cache: {
type: String,
required: false,
- default: 'filterOCRToCommunityEffectiveToDate',
+ default: 'filterOCRCommunitySubmittedToDate',
},
filterOCRFromCommunityDueDate_cache: {
type: String,
@@ -225,22 +190,18 @@ export default {
filterOCRCommunityStatus: sessionStorage.getItem(this.filterOCRCommunityStatus_cache) ?
sessionStorage.getItem(this.filterOCRCommunityStatus_cache) : 'all',
+ filterOCRCommunityObservationFromDate: sessionStorage.getItem(this.filterOCRCommunityObservationFromDate_cache) ?
+ sessionStorage.getItem(this.filterOCRCommunityObservationFromDate_cache) : '',
+
+ filterOCRCommunityObservationToDate: sessionStorage.getItem(this.filterOCRCommunityObservationToDate_cache) ?
+ sessionStorage.getItem(this.filterOCRCommunityObservationToDate_cache) : '',
+
filterOCRCommunitySubmittedFromDate: sessionStorage.getItem(this.filterOCRCommunitySubmittedFromDate_cache) ?
sessionStorage.getItem(this.filterOCRCommunitySubmittedFromDate_cache) : '',
filterOCRCommunitySubmittedToDate: sessionStorage.getItem(this.filterOCRCommunitySubmittedToDate_cache) ?
sessionStorage.getItem(this.filterOCRCommunitySubmittedToDate_cache) : '',
- filterOCRFromCommunityEffectiveFromDate: sessionStorage.getItem(this.filterOCRFromCommunityEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCRFromCommunityEffectiveFromDate_cache) : '',
- filterOCRToCommunityEffectiveFromDate: sessionStorage.getItem(this.filterOCRToCommunityEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCRToCommunityEffectiveFromDate_cache) : '',
-
- filterOCRFromCommunityEffectiveToDate: sessionStorage.getItem(this.filterOCRFromCommunityEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCRFromCommunityEffectiveToDate_cache) : '',
- filterOCRToCommunityEffectiveToDate: sessionStorage.getItem(this.filterOCRToCommunityEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCRToCommunityEffectiveToDate_cache) : '',
-
filterOCRFromCommunityDueDate: sessionStorage.getItem(this.filterOCRFromCommunityDueDate_cache) ?
sessionStorage.getItem(this.filterOCRFromCommunityDueDate_cache) : '',
filterOCRToCommunityDueDate: sessionStorage.getItem(this.filterOCRToCommunityDueDate_cache) ?
@@ -293,35 +254,25 @@ export default {
vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
sessionStorage.setItem(vm.filterOCRCommunityStatus_cache, vm.filterOCRCommunityStatus);
},
- filterOCRCommunitySubmittedFromDate: function() {
- let vm = this;
- vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRCommunitySubmittedFromDate_cache, vm.filterOCRCommunitySubmittedFromDate);
- },
- filterOCRCommunitySubmittedToDate: function() {
+ filterOCRCommunityObservationFromDate: function () {
let vm = this;
- vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRCommunitySubmittedToDate_cache, vm.filterOCRCommunitySubmittedToDate);
+ vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
+ sessionStorage.setItem(vm.filterOCRCommunityObservationFromDate_cache, vm.filterOCRCommunityObservationFromDate);
},
- filterOCRFromCommunityEffectiveFromDate: function(){
+ filterOCRCommunityObservationToDate: function () {
let vm = this;
- vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFromCommunityEffectiveFromDate_cache, vm.filterOCRFromCommunityEffectiveFromDate);
- },
- filterOCRToCommunityEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRToCommunityEffectiveFromDate_cache, vm.filterOCRToCommunityEffectiveFromDate);
+ vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
+ sessionStorage.setItem(vm.filterOCRCommunityObservationToDate_cache, vm.filterOCRCommunityObservationToDate);
},
- filterOCRFromCommunityEffectiveToDate: function(){
+ filterOCRCommunitySubmittedFromDate: function() {
let vm = this;
vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFromCommunityEffectiveToDate_cache, vm.filterOCRFromCommunityEffectiveToDate);
+ sessionStorage.setItem(vm.filterOCRCommunitySubmittedFromDate_cache, vm.filterOCRCommunitySubmittedFromDate);
},
- filterOCRToCommunityEffectiveToDate: function(){
+ filterOCRCommunitySubmittedToDate: function() {
let vm = this;
vm.$refs.community_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRToCommunityEffectiveToDate_cache, vm.filterOCRToCommunityEffectiveToDate);
+ sessionStorage.setItem(vm.filterOCRCommunitySubmittedToDate_cache, vm.filterOCRCommunitySubmittedToDate);
},
filterOCRFromCommunityDueDate: function(){
let vm = this;
@@ -345,12 +296,10 @@ export default {
if(this.filterOCRCommunityOccurrence === 'all' &&
this.filterOCRCommunityName === 'all' &&
this.filterOCRCommunityStatus === 'all' &&
+ this.filterOCRCommunityObservationFromDate === '' &&
+ this.filterOCRCommunityObservationToDate === '' &&
this.filterOCRCommunitySubmittedFromDate === '' &&
this.filterOCRCommunitySubmittedToDate === ''&&
- this.filterOCRFromCommunityEffectiveFromDate === '' &&
- this.filterOCRToCommunityEffectiveFromDate === '' &&
- this.filterOCRFromCommunityEffectiveToDate === '' &&
- this.filterOCRToCommunityEffectiveToDate === '' &&
this.filterOCRFromCommunityDueDate === '' &&
this.filterOCRToCommunityDueDate === ''){
return false
@@ -372,7 +321,7 @@ export default {
},
datatable_headers: function(){
if (this.is_internal){
- return ['Number','Occurrence','Community Name', 'Submission date/time', 'Submitter', 'Effective From', 'Effective To', 'Review Due', 'Status', 'Action']
+ return ['Number','Occurrence','Community Name', 'Observation Date', 'Main Observer','Submission Date', 'Submitter', 'Status', 'Action']
}
},
column_id: function(){
@@ -427,13 +376,45 @@ export default {
visible: true,
'render': function(data, type, full){
if (full.community_name){
- return full.community_name;
+ let value = full.community_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
}
return ''
},
name: "community__taxonomy__community_name",
}
},
+ column_observation_date_time: function(){
+ return {
+ data: "observation_date",
+ orderable: true,
+ searchable: true,
+ visible: true,
+ 'render': function(data, type, full){
+ if (full.observation_date){
+ return full.observation_date;
+ }
+ return ''
+ },
+ name: "observation_date",
+ }
+ },
+ column_main_observer: function () {
+ return {
+ data: "main_observer",
+ orderable: false,
+ searchable: false,
+ visible: true,
+ 'render': function (data, type, full) {
+ if (full.main_observer) {
+ return full.main_observer;
+ }
+ return ''
+ },
+ name: "main_observer",
+ }
+ },
column_submission_date_time: function(){
return {
data: "reported_date",
@@ -464,33 +445,6 @@ export default {
name: "submitter__first_name, submitter__last_name",
}
},
- column_effective_from: function(){
- return {
- data: "effective_from",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_from",
- }
- },
- column_effective_to: function(){
- return {
- data: "effective_to",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_to",
- }
- },
- column_review_due_date: function(){
- return {
- data: "review_due_date",
- orderable: true,
- searchable: true,
- visible: true,
- name: "review_due_date",
- }
- },
column_status: function(){
return {
data: "processing_status_display",
@@ -562,11 +516,10 @@ export default {
vm.column_number,
vm.column_occurrence,
vm.column_community_name,
+ vm.column_observation_date_time,
+ vm.column_main_observer,
vm.column_submission_date_time,
vm.column_submitter,
- vm.column_effective_from,
- vm.column_effective_to,
- vm.column_review_due_date,
vm.column_status,
vm.column_action,
]
@@ -601,12 +554,10 @@ export default {
d.filter_occurrence = vm.filterOCRCommunityOccurrence;
d.filter_community_name = vm.filterOCRCommunityName;
d.filter_status = vm.filterOCRCommunityStatus;
+ d.filter_observation_from_date = vm.filterOCRCommunityObservationFromDate;
+ d.filter_observation_to_date = vm.filterOCRCommunityObservationToDate;
d.filter_submitted_from_date = vm.filterOCRCommunitySubmittedFromDate;
d.filter_submitted_to_date = vm.filterOCRCommunitySubmittedToDate;
- d.filter_from_effective_from_date = vm.filterOCRFromCommunityEffectiveFromDate;
- d.filter_to_effective_from_date = vm.filterOCRToCommunityEffectiveFromDate;
- d.filter_from_effective_to_date = vm.filterOCRFromCommunityEffectiveToDate;
- d.filter_to_effective_to_date = vm.filterOCRToCommunityEffectiveToDate;
d.filter_from_due_date = vm.filterOCRFromCommunityDueDate;
d.filter_to_due_date = vm.filterOCRToCommunityDueDate;
d.is_internal = vm.is_internal;
@@ -898,12 +849,10 @@ export default {
filter_occurrence: vm.filterOCRCommunityOccurrence,
filter_community_name: vm.filterOCRCommunityName,
filter_status: vm.filterOCRCommunityStatus,
+ filter_observation_from_date: vm.filterOCRCommunityObservationFromDate,
+ filter_observation_to_date: vm.filterOCRCommunityObservationToDate,
filter_submitted_from_date: vm.filterOCRCommunitySubmittedFromDate,
filter_submitted_to_date: vm.filterOCRCommunitySubmittedToDate,
- filter_from_effective_from_date: vm.filterOCRFromCommunityEffectiveFromDate,
- filter_to_effective_from_date: vm.filterOCRToCommunityEffectiveFromDate,
- filter_from_effective_to_date: vm.filterOCRFromCommunityEffectiveToDate,
- filter_to_effective_to_date: vm.filterOCRToCommunityEffectiveToDate,
filter_from_due_date: vm.filterOCRFromCommunityDueDate,
filter_to_due_date: vm.filterOCRToCommunityDueDate,
is_internal: vm.is_internal,
diff --git a/boranga/frontend/boranga/src/components/common/occurrence_report_fauna_dashboard.vue b/boranga/frontend/boranga/src/components/common/occurrence_report_fauna_dashboard.vue
index b0736574..f814250e 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence_report_fauna_dashboard.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence_report_fauna_dashboard.vue
@@ -29,58 +29,32 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
@@ -163,35 +137,25 @@ export default {
required: false,
default: 'filterOCRFaunaStatus',
},
- filterOCRFaunaSubmittedFromDate_cache: {
+ filterOCRFaunaObservationFromDate_cache: {
type: String,
required: false,
- default: 'filterOCRFaunaSubmittedFromDate',
+ default: 'filterOCRFaunaObservationFromDate',
},
- filterOCRFaunaSubmittedToDate_cache: {
+ filterOCRFaunaObservationToDate_cache: {
type: String,
required: false,
- default: 'filterOCRFaunaSubmittedToDate',
+ default: 'filterOCRFaunaObservationToDate',
},
- filterOCRFromFaunaEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCRFromFaunaEffectiveFromDate',
- },
- filterOCRToFaunaEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCRToFaunaEffectiveFromDate',
- },
- filterOCRFromFaunaEffectiveToDate_cache: {
+ filterOCRFaunaSubmittedFromDate_cache: {
type: String,
required: false,
- default: 'filterOCRFromFaunaEffectiveToDate',
+ default: 'filterOCRFaunaSubmittedFromDate',
},
- filterOCRToFaunaEffectiveToDate_cache: {
+ filterOCRFaunaSubmittedToDate_cache: {
type: String,
required: false,
- default: 'filterOCRToFaunaEffectiveToDate',
+ default: 'filterOCRFaunaSubmittedToDate',
},
filterOCRFromFaunaDueDate_cache: {
type: String,
@@ -221,22 +185,18 @@ export default {
filterOCRFaunaStatus: sessionStorage.getItem(this.filterOCRFaunaStatus_cache) ?
sessionStorage.getItem(this.filterOCRFaunaStatus_cache) : 'all',
+ filterOCRFaunaObservationFromDate: sessionStorage.getItem(this.filterOCRFaunaObservationFromDate_cache) ?
+ sessionStorage.getItem(this.filterOCRFaunaObservationFromDate_cache) : '',
+
+ filterOCRFaunaObservationToDate: sessionStorage.getItem(this.filterOCRFaunaObservationToDate_cache) ?
+ sessionStorage.getItem(this.filterOCRFaunaObservationToDate_cache) : '',
+
filterOCRFaunaSubmittedFromDate: sessionStorage.getItem(this.filterOCRFaunaSubmittedFromDate_cache) ?
sessionStorage.getItem(this.filterOCRFaunaSubmittedFromDate_cache) : '',
filterOCRFaunaSubmittedToDate: sessionStorage.getItem(this.filterOCRFaunaSubmittedToDate_cache) ?
sessionStorage.getItem(this.filterOCRFaunaSubmittedToDate_cache) : '',
- filterOCRFromFaunaEffectiveFromDate: sessionStorage.getItem(this.filterOCRFromFaunaEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCRFromFaunaEffectiveFromDate_cache) : '',
- filterOCRToFaunaEffectiveFromDate: sessionStorage.getItem(this.filterOCRToFaunaEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCRToFaunaEffectiveFromDate_cache) : '',
-
- filterOCRFromFaunaEffectiveToDate: sessionStorage.getItem(this.filterOCRFromFaunaEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCRFromFaunaEffectiveToDate_cache) : '',
- filterOCRToFaunaEffectiveToDate: sessionStorage.getItem(this.filterOCRToFaunaEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCRToFaunaEffectiveToDate_cache) : '',
-
filterOCRFromFaunaDueDate: sessionStorage.getItem(this.filterOCRFromFaunaDueDate_cache) ?
sessionStorage.getItem(this.filterOCRFromFaunaDueDate_cache) : '',
filterOCRToFaunaDueDate: sessionStorage.getItem(this.filterOCRToFaunaDueDate_cache) ?
@@ -286,35 +246,25 @@ export default {
vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
sessionStorage.setItem(vm.filterOCRFaunaStatus_cache, vm.filterOCRFaunaStatus);
},
- filterOCRFaunaSubmittedFromDate: function () {
+ filterOCRFaunaObservationFromDate: function () {
let vm = this;
vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFaunaSubmittedFromDate_cache, vm.filterOCRFaunaSubmittedFromDate);
+ sessionStorage.setItem(vm.filterOCRFaunaObservationFromDate_cache, vm.filterOCRFaunaObservationFromDate);
},
- filterOCRFaunaSubmittedToDate: function () {
+ filterOCRFaunaObservationToDate: function () {
let vm = this;
vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFaunaSubmittedToDate_cache, vm.filterOCRFaunaSubmittedToDate);
- },
- filterOCRFromFaunaEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFromFaunaEffectiveFromDate_cache, vm.filterOCRFromFaunaEffectiveFromDate);
- },
- filterOCRToFaunaEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRToFaunaEffectiveFromDate_cache, vm.filterOCRToFaunaEffectiveFromDate);
+ sessionStorage.setItem(vm.filterOCRFaunaObservationToDate_cache, vm.filterOCRFaunaObservationToDate);
},
- filterOCRFromFaunaEffectiveToDate: function(){
+ filterOCRFaunaSubmittedFromDate: function () {
let vm = this;
- vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFromFaunaEffectiveToDate_cache, vm.filterOCRFromFaunaEffectiveToDate);
+ vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
+ sessionStorage.setItem(vm.filterOCRFaunaSubmittedFromDate_cache, vm.filterOCRFaunaSubmittedFromDate);
},
- filterOCRToFaunaEffectiveToDate: function(){
+ filterOCRFaunaSubmittedToDate: function () {
let vm = this;
- vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRToFaunaEffectiveToDate_cache, vm.filterOCRToFaunaEffectiveToDate);
+ vm.$refs.fauna_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
+ sessionStorage.setItem(vm.filterOCRFaunaSubmittedToDate_cache, vm.filterOCRFaunaSubmittedToDate);
},
filterOCRFromFaunaDueDate: function(){
let vm = this;
@@ -338,12 +288,10 @@ export default {
if (this.filterOCRFaunaOccurrence === 'all' &&
this.filterOCRFaunaScientificName === 'all' &&
this.filterOCRFaunaStatus === 'all' &&
+ this.filterOCRFaunaObservationFromDate === '' &&
+ this.filterOCRFaunaObservationToDate === '' &&
this.filterOCRFaunaSubmittedFromDate === '' &&
this.filterOCRFaunaSubmittedToDate === '' &&
- this.filterOCRFromFaunaEffectiveFromDate === '' &&
- this.filterOCRToFaunaEffectiveFromDate === '' &&
- this.filterOCRFromFaunaEffectiveToDate === '' &&
- this.filterOCRToFaunaEffectiveToDate === '' &&
this.filterOCRFromFaunaDueDate === '' &&
this.filterOCRToFaunaDueDate === '') {
return false
@@ -362,7 +310,7 @@ export default {
},
datatable_headers: function () {
if (this.is_internal) {
- return ['Number', 'Occurrence', 'Scientific Name', 'Submission date/time', 'Submitter', 'Effective From', 'Effective To', 'Review Due', 'Status', 'Action']
+ return ['Number', 'Occurrence', 'Scientific Name', 'Observation Date', 'Main Observer', 'Submission Date', 'Submitter', 'Status', 'Action']
}
},
column_id: function () {
@@ -417,68 +365,73 @@ export default {
visible: true,
'render': function (data, type, full) {
if (full.scientific_name) {
- return full.scientific_name;
+ let value = full.scientific_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
}
return ''
},
name: "species__taxonomy__scientific_name",
}
},
- column_submission_date_time: function () {
+ column_observation_date_time: function () {
return {
- data: "reported_date",
+ data: "observation_date",
orderable: true,
searchable: true,
visible: true,
'render': function (data, type, full) {
- if (full.reported_date) {
- return full.reported_date;
+ if (full.observation_date) {
+ return full.observation_date;
}
return ''
},
- name: "reported_date",
+ name: "observation_date",
}
},
- column_submitter: function () {
+ column_main_observer: function () {
return {
- data: "submitter",
+ data: "main_observer",
orderable: false,
searchable: false,
visible: true,
'render': function (data, type, full) {
- if (full.submitter) {
- return full.submitter;
+ if (full.main_observer) {
+ return full.main_observer;
}
return ''
},
- name: "submitter__first_name, submitter__last_name",
- }
- },
- column_effective_from: function () {
- return {
- data: "effective_from",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_from",
+ name: "main_observer",
}
},
- column_effective_to: function () {
+ column_submission_date_time: function () {
return {
- data: "effective_to",
+ data: "reported_date",
orderable: true,
searchable: true,
visible: true,
- name: "effective_to",
+ 'render': function (data, type, full) {
+ if (full.reported_date) {
+ return full.reported_date;
+ }
+ return ''
+ },
+ name: "reported_date",
}
},
- column_review_due_date: function () {
+ column_submitter: function () {
return {
- data: "review_due_date",
- orderable: true,
- searchable: true,
+ data: "submitter",
+ orderable: false,
+ searchable: false,
visible: true,
- name: "review_due_date",
+ 'render': function (data, type, full) {
+ if (full.submitter) {
+ return full.submitter;
+ }
+ return ''
+ },
+ name: "submitter__first_name, submitter__last_name",
}
},
column_status: function () {
@@ -552,11 +505,10 @@ export default {
vm.column_number,
vm.column_occurrence,
vm.column_scientific_name,
+ vm.column_observation_date_time,
+ vm.column_main_observer,
vm.column_submission_date_time,
vm.column_submitter,
- vm.column_effective_from,
- vm.column_effective_to,
- vm.column_review_due_date,
vm.column_status,
vm.column_action,
]
@@ -591,12 +543,10 @@ export default {
d.filter_occurrence = vm.filterOCRFaunaOccurrence;
d.filter_scientific_name = vm.filterOCRFaunaScientificName;
d.filter_status = vm.filterOCRFaunaStatus;
+ d.filter_observation_from_date = vm.filterOCRFaunaObservationFromDate;
+ d.filter_observation_to_date = vm.filterOCRFaunaObservationToDate;
d.filter_submitted_from_date = vm.filterOCRFaunaSubmittedFromDate;
d.filter_submitted_to_date = vm.filterOCRFaunaSubmittedToDate;
- d.filter_from_effective_from_date = vm.filterOCRFromFaunaEffectiveFromDate;
- d.filter_to_effective_from_date = vm.filterOCRToFaunaEffectiveFromDate;
- d.filter_from_effective_to_date = vm.filterOCRFromFaunaEffectiveToDate;
- d.filter_to_effective_to_date = vm.filterOCRToFaunaEffectiveToDate;
d.filter_from_due_date = vm.filterOCRFromFaunaDueDate;
d.filter_to_due_date = vm.filterOCRToFaunaDueDate;
d.is_internal = vm.is_internal;
@@ -889,12 +839,10 @@ export default {
filter_occurrence: vm.filterOCRFaunaOccurrence,
filter_scientific_name: vm.filterOCRFaunaScientificName,
filter_status: vm.filterOCRFaunaStatus,
+ filter_observation_from_date: vm.filterOCRFaunaObservationFromDate,
+ filter_observation_to_date: vm.filterOCRFaunaObservationToDate,
filter_submitted_from_date: vm.filterOCRFaunaSubmittedFromDate,
filter_submitted_to_date: vm.filterOCRFaunaSubmittedToDate,
- filter_from_effective_from_date: vm.filterOCRFromFaunaEffectiveFromDate,
- filter_to_effective_from_date: vm.filterOCRToFaunaEffectiveFromDate,
- filter_from_effective_to_date: vm.filterOCRFromFaunaEffectiveToDate,
- filter_to_effective_to_date: vm.filterOCRToFaunaEffectiveToDate,
filter_from_due_date: vm.filterOCRFromFaunaDueDate,
filter_to_due_date: vm.filterOCRToFaunaDueDate,
is_internal: vm.is_internal,
diff --git a/boranga/frontend/boranga/src/components/common/occurrence_report_flora_dashboard.vue b/boranga/frontend/boranga/src/components/common/occurrence_report_flora_dashboard.vue
index 679c7d8e..2522ec0b 100644
--- a/boranga/frontend/boranga/src/components/common/occurrence_report_flora_dashboard.vue
+++ b/boranga/frontend/boranga/src/components/common/occurrence_report_flora_dashboard.vue
@@ -29,58 +29,32 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
@@ -168,35 +142,25 @@ export default {
required: false,
default: 'filterOCRFloraStatus',
},
- filterOCRFloraSubmittedFromDate_cache: {
+ filterOCRFloraObservationFromDate_cache: {
type: String,
required: false,
- default: 'filterOCRFloraSubmittedFromDate',
+ default: 'filterOCRFloraObservationFromDate',
},
- filterOCRFloraSubmittedToDate_cache: {
+ filterOCRFloraObservationToDate_cache: {
type: String,
required: false,
- default: 'filterOCRFloraSubmittedToDate',
+ default: 'filterOCRFloraObservationToDate',
},
- filterOCRFromFloraEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCRFromFloraEffectiveFromDate',
- },
- filterOCRToFloraEffectiveFromDate_cache: {
- type: String,
- required: false,
- default: 'filterOCRToFloraEffectiveFromDate',
- },
- filterOCRFromFloraEffectiveToDate_cache: {
+ filterOCRFloraSubmittedFromDate_cache: {
type: String,
required: false,
- default: 'filterOCRFromFloraEffectiveToDate',
+ default: 'filterOCRFloraSubmittedFromDate',
},
- filterOCRToFloraEffectiveToDate_cache: {
+ filterOCRFloraSubmittedToDate_cache: {
type: String,
required: false,
- default: 'filterOCRToFloraEffectiveToDate',
+ default: 'filterOCRFloraSubmittedToDate',
},
filterOCRFromFloraDueDate_cache: {
type: String,
@@ -226,22 +190,18 @@ export default {
filterOCRFloraStatus: sessionStorage.getItem(this.filterOCRFloraStatus_cache) ?
sessionStorage.getItem(this.filterOCRFloraStatus_cache) : 'all',
+ filterOCRFloraObservationFromDate: sessionStorage.getItem(this.filterOCRFloraObservationFromDate_cache) ?
+ sessionStorage.getItem(this.filterOCRFloraObservationFromDate_cache) : '',
+
+ filterOCRFloraObservationToDate: sessionStorage.getItem(this.filterOCRFloraObservationToDate_cache) ?
+ sessionStorage.getItem(this.filterOCRFloraObservationToDate_cache) : '',
+
filterOCRFloraSubmittedFromDate: sessionStorage.getItem(this.filterOCRFloraSubmittedFromDate_cache) ?
sessionStorage.getItem(this.filterOCRFloraSubmittedFromDate_cache) : '',
filterOCRFloraSubmittedToDate: sessionStorage.getItem(this.filterOCRFloraSubmittedToDate_cache) ?
sessionStorage.getItem(this.filterOCRFloraSubmittedToDate_cache) : '',
- filterOCRFromFloraEffectiveFromDate: sessionStorage.getItem(this.filterOCRFromFloraEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCRFromFloraEffectiveFromDate_cache) : '',
- filterOCRToFloraEffectiveFromDate: sessionStorage.getItem(this.filterOCRToFloraEffectiveFromDate_cache) ?
- sessionStorage.getItem(this.filterOCRToFloraEffectiveFromDate_cache) : '',
-
- filterOCRFromFloraEffectiveToDate: sessionStorage.getItem(this.filterOCRFromFloraEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCRFromFloraEffectiveToDate_cache) : '',
- filterOCRToFloraEffectiveToDate: sessionStorage.getItem(this.filterOCRToFloraEffectiveToDate_cache) ?
- sessionStorage.getItem(this.filterOCRToFloraEffectiveToDate_cache) : '',
-
filterOCRFromFloraDueDate: sessionStorage.getItem(this.filterOCRFromFloraDueDate_cache) ?
sessionStorage.getItem(this.filterOCRFromFloraDueDate_cache) : '',
filterOCRToFloraDueDate: sessionStorage.getItem(this.filterOCRToFloraDueDate_cache) ?
@@ -290,35 +250,25 @@ export default {
vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
sessionStorage.setItem(vm.filterOCRFloraStatus_cache, vm.filterOCRFloraStatus);
},
- filterOCRFloraSubmittedFromDate: function () {
+ filterOCRFloraObservationFromDate: function () {
let vm = this;
vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFloraSubmittedFromDate_cache, vm.filterOCRFloraSubmittedFromDate);
+ sessionStorage.setItem(vm.filterOCRFloraObservationFromDate_cache, vm.filterOCRFloraObservationFromDate);
},
- filterOCRFloraSubmittedToDate: function () {
+ filterOCRFloraObservationToDate: function () {
let vm = this;
vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFloraSubmittedToDate_cache, vm.filterOCRFloraSubmittedToDate);
- },
- filterOCRFromFloraEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFromFloraEffectiveFromDate_cache, vm.filterOCRFromFloraEffectiveFromDate);
- },
- filterOCRToFloraEffectiveFromDate: function(){
- let vm = this;
- vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRToFloraEffectiveFromDate_cache, vm.filterOCRToFloraEffectiveFromDate);
+ sessionStorage.setItem(vm.filterOCRFloraObservationToDate_cache, vm.filterOCRFloraObservationToDate);
},
- filterOCRFromFloraEffectiveToDate: function(){
+ filterOCRFloraSubmittedFromDate: function () {
let vm = this;
- vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRFromFloraEffectiveToDate_cache, vm.filterOCRFromFloraEffectiveToDate);
+ vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
+ sessionStorage.setItem(vm.filterOCRFloraSubmittedFromDate_cache, vm.filterOCRFloraSubmittedFromDate);
},
- filterOCRToFloraEffectiveToDate: function(){
+ filterOCRFloraSubmittedToDate: function () {
let vm = this;
- vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers,false); // This calls ajax() backend call.
- sessionStorage.setItem(vm.filterOCRToFloraEffectiveToDate_cache, vm.filterOCRToFloraEffectiveToDate);
+ vm.$refs.flora_ocr_datatable.vmDataTable.ajax.reload(helpers.enablePopovers, false); // This calls ajax() backend call.
+ sessionStorage.setItem(vm.filterOCRFloraSubmittedToDate_cache, vm.filterOCRFloraSubmittedToDate);
},
filterOCRFromFloraDueDate: function(){
let vm = this;
@@ -342,12 +292,10 @@ export default {
if (this.filterOCRFloraOccurrence === 'all' &&
this.filterOCRFloraScientificName === 'all' &&
this.filterOCRFloraStatus === 'all' &&
+ this.filterOCRFloraObservationFromDate === '' &&
+ this.filterOCRFloraObservationToDate === '' &&
this.filterOCRFloraSubmittedFromDate === '' &&
this.filterOCRFloraSubmittedToDate === '' &&
- this.filterOCRFromFloraEffectiveFromDate === '' &&
- this.filterOCRToFloraEffectiveFromDate === '' &&
- this.filterOCRFromFloraEffectiveToDate === '' &&
- this.filterOCRToFloraEffectiveToDate === '' &&
this.filterOCRFromFloraDueDate === '' &&
this.filterOCRToFloraDueDate === '') {
return false
@@ -366,7 +314,7 @@ export default {
},
datatable_headers: function () {
if (this.is_internal) {
- return ['Number', 'Occurrence', 'Scientific Name', 'Submission date/time', 'Submitter', 'Effective From', 'Effective To', 'Review Due', 'Status', 'Action']
+ return ['Number', 'Occurrence', 'Scientific Name', 'Observation Date', 'Main Observer','Submission Date', 'Submitter', 'Status', 'Action']
}
},
column_id: function () {
@@ -421,68 +369,73 @@ export default {
visible: true,
'render': function (data, type, full) {
if (full.scientific_name) {
- return full.scientific_name;
+ let value = full.scientific_name;
+ let result = helpers.dtPopover(value, 30, 'hover');
+ return type == 'export' ? value : result;
}
return ''
},
name: "species__taxonomy__scientific_name",
}
},
- column_submission_date_time: function () {
+ column_observation_date_time: function () {
return {
- data: "reported_date",
+ data: "observation_date",
orderable: true,
searchable: true,
visible: true,
'render': function (data, type, full) {
- if (full.reported_date) {
- return full.reported_date;
+ if (full.observation_date) {
+ return full.observation_date;
}
return ''
},
- name: "reported_date",
+ name: "observation_date",
}
},
- column_submitter: function () {
+ column_main_observer: function () {
return {
- data: "submitter",
+ data: "main_observer",
orderable: false,
searchable: false,
visible: true,
'render': function (data, type, full) {
- if (full.submitter) {
- return full.submitter;
+ if (full.main_observer) {
+ return full.main_observer;
}
return ''
},
- name: "submitter__first_name, submitter__last_name",
- }
- },
- column_effective_from: function () {
- return {
- data: "effective_from",
- orderable: true,
- searchable: true,
- visible: true,
- name: "effective_from",
+ name: "main_observer",
}
},
- column_effective_to: function () {
+ column_submission_date_time: function () {
return {
- data: "effective_to",
+ data: "reported_date",
orderable: true,
searchable: true,
visible: true,
- name: "effective_to",
+ 'render': function (data, type, full) {
+ if (full.reported_date) {
+ return full.reported_date;
+ }
+ return ''
+ },
+ name: "reported_date",
}
},
- column_review_due_date: function () {
+ column_submitter: function () {
return {
- data: "review_due_date",
- orderable: true,
- searchable: true,
+ data: "submitter",
+ orderable: false,
+ searchable: false,
visible: true,
- name: "review_due_date",
+ 'render': function (data, type, full) {
+ if (full.submitter) {
+ return full.submitter;
+ }
+ return ''
+ },
+ name: "submitter__first_name, submitter__last_name",
}
},
column_status: function () {
@@ -555,11 +508,10 @@ export default {
vm.column_number,
vm.column_occurrence,
vm.column_scientific_name,
+ vm.column_observation_date_time,
+ vm.column_main_observer,
vm.column_submission_date_time,
vm.column_submitter,
- vm.column_effective_from,
- vm.column_effective_to,
- vm.column_review_due_date,
vm.column_status,
vm.column_action,
]
@@ -594,12 +546,10 @@ export default {
d.filter_occurrence = vm.filterOCRFloraOccurrence;
d.filter_scientific_name = vm.filterOCRFloraScientificName;
d.filter_status = vm.filterOCRFloraStatus;
+ d.filter_observation_from_date = vm.filterOCRFloraObservationFromDate;
+ d.filter_observation_to_date = vm.filterOCRFloraObservationToDate;
d.filter_submitted_from_date = vm.filterOCRFloraSubmittedFromDate;
d.filter_submitted_to_date = vm.filterOCRFloraSubmittedToDate;
- d.filter_from_effective_from_date = vm.filterOCRFromFloraEffectiveFromDate;
- d.filter_to_effective_from_date = vm.filterOCRToFloraEffectiveFromDate;
- d.filter_from_effective_to_date = vm.filterOCRFromFloraEffectiveToDate;
- d.filter_to_effective_to_date = vm.filterOCRToFloraEffectiveToDate;
d.filter_from_due_date = vm.filterOCRFromFloraDueDate;
d.filter_to_due_date = vm.filterOCRToFloraDueDate;
d.is_internal = vm.is_internal;
@@ -889,12 +839,10 @@ export default {
filter_occurrence: vm.filterOCRFloraOccurrence,
filter_scientific_name: vm.filterOCRFloraScientificName,
filter_status: vm.filterOCRFloraStatus,
+ filter_observation_from_date: vm.filterOCRFloraObservationFromDate,
+ filter_observation_to_date: vm.filterOCRFloraObservationToDate,
filter_submitted_from_date: vm.filterOCRFloraSubmittedFromDate,
filter_submitted_to_date: vm.filterOCRFloraSubmittedToDate,
- filter_from_effective_from_date: vm.filterOCRFromFloraEffectiveFromDate,
- filter_to_effective_from_date: vm.filterOCRToFloraEffectiveFromDate,
- filter_from_effective_to_date: vm.filterOCRFromFloraEffectiveToDate,
- filter_to_effective_to_date: vm.filterOCRToFloraEffectiveToDate,
filter_from_due_date: vm.filterOCRFromFloraDueDate,
filter_to_due_date: vm.filterOCRToFloraDueDate,
is_internal: vm.is_internal,
diff --git a/boranga/frontend/boranga/src/components/common/ocr_referrals_dashboard.vue b/boranga/frontend/boranga/src/components/common/ocr_referrals_dashboard.vue
index f68a7629..5611b2fa 100644
--- a/boranga/frontend/boranga/src/components/common/ocr_referrals_dashboard.vue
+++ b/boranga/frontend/boranga/src/components/common/ocr_referrals_dashboard.vue
@@ -170,7 +170,7 @@ export default {
}
},
datatable_headers: function () {
- let headers = ['ID', 'Number', 'Occurrence', 'Scientific Name', 'Submission date/time', 'Submitter', 'Effective From', 'Effective To', 'Review Due', 'Status', 'Action']
+ let headers = ['ID', 'Number', 'Occurrence', 'Scientific Name', 'Submission date/time', 'Submitter', 'Status', 'Action']
if (this.group_type_name == 'community') {
headers.splice(3, 1, 'Community Name')
}
@@ -254,33 +254,6 @@ export default {
visible: true,
}
},
- column_effective_from: function () {
- return {
- data: "effective_from",
- orderable: true,
- searchable: true,
- visible: true,
- name: "occurrence_report__effective_from",
- }
- },
- column_effective_to: function () {
- return {
- data: "effective_to",
- orderable: true,
- searchable: true,
- visible: true,
- name: "occurrence_report__effective_to",
- }
- },
- column_review_due_date: function () {
- return {
- data: "review_due_date",
- orderable: true,
- searchable: true,
- visible: true,
- name: "occurrence_report__review_due_date",
- }
- },
column_status: function () {
return {
data: "processing_status_display",
@@ -337,9 +310,6 @@ export default {
vm.column_scientific_name,
vm.column_submission_date_time,
vm.column_submitter,
- vm.column_effective_from,
- vm.column_effective_to,
- vm.column_review_due_date,
vm.column_status,
vm.column_action,
]
diff --git a/boranga/frontend/boranga/src/components/internal/occurrence/ocr_approve.vue b/boranga/frontend/boranga/src/components/internal/occurrence/ocr_approve.vue
index 91c00c4f..6cc274e5 100644
--- a/boranga/frontend/boranga/src/components/internal/occurrence/ocr_approve.vue
+++ b/boranga/frontend/boranga/src/components/internal/occurrence/ocr_approve.vue
@@ -31,13 +31,6 @@
-
-
@@ -97,15 +90,6 @@ export default {
proposeApproveButtonDisabled: function () {
return !this.approve.create_new_occurrence && !this.approve.occurrence;
},
- effective_from_text: function () {
- if(!this.approval_details || !this.approval_details.effective_from_date || !this.approval_details.effective_to_date) {
- return '';
- }
- let effective_from_date = new Date(this.approval_details.effective_from_date).toLocaleDateString('en-AU') ;
- let effective_to_date = new Date(this.approval_details.effective_to_date).toLocaleDateString('en-AU');
-
- return `${effective_from_date} to ${effective_to_date}`;
- },
},
methods: {
ok: function () {
diff --git a/boranga/frontend/boranga/src/components/internal/occurrence/ocr_propose_approve.vue b/boranga/frontend/boranga/src/components/internal/occurrence/ocr_propose_approve.vue
index 73bf4971..19dcaf0e 100644
--- a/boranga/frontend/boranga/src/components/internal/occurrence/ocr_propose_approve.vue
+++ b/boranga/frontend/boranga/src/components/internal/occurrence/ocr_propose_approve.vue
@@ -44,16 +44,6 @@
name="new_occurrence_name" ref="new_occurrence_name"
v-model="propose_approve.new_occurrence_name" required />
-
-
-
-
-
-
-
-