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
6 changes: 5 additions & 1 deletion bcap/functions/bcap_site_descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class BCAPSiteDescriptors(AbstractPrimaryDescriptorsFunction):
aliases.REGISTRATION_STATUS,
aliases.TYPOLOGY_CLASS,
]
_popup_nodes = [aliases.CITY, "address"]
_popup_nodes = [aliases.REGISTRATION_STATUS, aliases.NAME, "typologies"]
_card_nodes = [aliases.REGISTRATION_STATUS, aliases.NAME, "typologies"]
_address_nodes = [
[aliases.STREET_NUMBER, aliases.STREET_NAME],
Expand Down Expand Up @@ -131,6 +131,10 @@ def get_primary_descriptor_from_nodes(
return_value += BCAPSiteDescriptors._format_value(
"Descriptor", typology_values, config
)
elif alias == aliases.REGISTRATION_STATUS and alias in display_values:
return_value += BCAPSiteDescriptors._format_value(
"Registration Status", display_values[alias], config
)
elif alias in display_values:
return_value += BCAPSiteDescriptors._format_value(
nodes[alias].name, display_values[alias], config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,18 @@ let view_model = BaseFilter.extend({
return false;
}

let op = filter_value.op;

if (op === 'null' || op === 'not_null') {
return true;
}

let val = filter_value.val;

if (val === 'null' || val === 'not_null') {
return true;
}

if (val === undefined || val === null || val === '') {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions bcap/pkg/system_settings/System_Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"c5a2b94a-fadd-11e6-a029-6c4008b05c4c": {
"en": {
"direction": "ltr",
"value": "BC Archaeology Portal"
"value": "BCAP"
}
},
"c5a2bdb3-fadd-11e6-8c96-6c4008b05c4c": {
Expand Down Expand Up @@ -343,4 +343,4 @@
}
]
}
}
}
10 changes: 9 additions & 1 deletion bcap/search_components/cross_model_advanced_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
from arches.app.search.search_engine_factory import SearchEngineFactory
from arches.app.utils.betterJSONSerializer import JSONDeserializer


details = {
"classname": "CrossModelAdvancedSearch",
"componentname": "cross-model-advanced-search",
Expand Down Expand Up @@ -225,7 +224,16 @@ def _is_valid(self, value: Any) -> bool:
return False

if isinstance(value, dict):
op = value.get("op", "")

if op in ("null", "not_null"):
return True

val = value.get("val", "")

if val in ("null", "not_null"):
return True

return bool(val) or val == 0 or val is False

return True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ const {

const authorityData = computed(() => currentData.value?.authority || []);
const siteNamesData = computed(() => currentData.value?.site_names || []);

const temporaryNumbersData = computed((): TemporaryNumberTile[] => {
return (props.siteVisitData ?? [])
const all = (props.siteVisitData ?? [])
.map(
(visit) =>
visit.aliased_data?.identification?.aliased_data
Expand All @@ -198,6 +199,21 @@ const temporaryNumbersData = computed((): TemporaryNumberTile[] => {
(tile): tile is TemporaryNumberTile =>
!!tile?.aliased_data?.temporary_number?.node_value,
);

const seen = new Set<string>();

return all.filter((tile) => {
const val = String(
tile.aliased_data?.temporary_number?.node_value ?? '',
);

if (seen.has(val)) {
return false;
}

seen.add(val);
return true;
});
});

const siteAlertDataRaw = computed(() => {
Expand Down Expand Up @@ -441,7 +457,7 @@ const parentSite = computed(() => {
</DetailsSection>

<DetailsSection
section-title="Decision History"
section-title="Registration Status History"
variant="subsection"
:visible="true"
:class="{ 'empty-section': !hasDecisionHistory }"
Expand Down
7 changes: 6 additions & 1 deletion bcap/src/bcap/components/pages/details/DetailsPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed, type Ref } from 'vue';
import { ref, computed, watchEffect, type Ref } from 'vue';
import type { DetailsData } from '@/bcap/types.ts';
import { formatDateTime } from '@/bcap/util.ts';
import type { EditLogData } from '@/bcgov_arches_common/types.ts';
Expand Down Expand Up @@ -56,6 +56,11 @@ const { data: relatedSiteVisits } = useRelatedResourceData<SiteVisitSchema>(
siteVisitResourceIdComputed,
);

watchEffect(() => {
const name = props.data.displayname || '';
document.title = name ? `BCAP - ${name} - Details` : 'BCAP';
});

const archSiteTileIds = computed(() => {
const tileIds: string[] = [];
if (!resourceData.value || props.data.graph_slug !== 'archaeological_site')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ const props = withDefaults(
const currentData = computed(() => props.data?.aliased_data);

const jurisdictionTenureColumns = [
{ field: 'site_jurisdiction', label: 'Site Jurisdiction' },
{ field: 'tenure_type', label: 'Tenure Type' },
{ field: 'tenure_identifier', label: 'Tenure Identifier' },
{ field: 'site_jurisdiction', label: 'Jurisdiction' },
{ field: 'tenure_type', label: 'Tenure/Reserves Type' },
{ field: 'tenure_identifier', label: 'Description' },
{ field: 'tenure_remarks', label: 'Tenure Remarks', isHtml: true },
{ field: 'jurisdiction_entered_by', label: 'Entered By' },
{ field: 'jurisdiction_entered_date', label: 'Entered Date' },
{ field: 'jurisdiction_entered_by', label: 'Modified By' },
{ field: 'jurisdiction_entered_date', label: 'Modified On' },
];

const hriaChronologyColumns = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ const permittedValue = computed(() => {

if (nonPermittedField && 'node_value' in nonPermittedField) {
const nonPermitted = nonPermittedField.node_value;
if (nonPermitted === undefined || nonPermitted === null)
return 'Unknown';
if (nonPermitted === undefined || nonPermitted === null) return '';

return nonPermitted ? 'No' : 'Yes';
return nonPermitted ? 'Yes' : 'No';
}

return 'Unknown';
return '';
});

const siteVisitDetailsTableData = computed(() => {
Expand Down
6 changes: 3 additions & 3 deletions bcap/templates/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ <h1>{% blocktrans %}bc archaeology portal{% endblocktrans %}</h1>
alt="null"
/>
<div class="slide-caption bc-splash-caption">
<h2>{% blocktrans %}BC Archaeology Portal{% endblocktrans %}</h2>
<h2>{% blocktrans %}BCAP{% endblocktrans %}</h2>
<h3>{% trans "Official Register of Archaeological Sites for British Columbia" %}</h3>
<!-- this is a workaround for a layout issue causing the section to not be limited -->
<h4 class="area-description">
Expand All @@ -342,7 +342,7 @@ <h4 class="area-description">
alt="null"
/>
<div class="slide-caption bc-splash-caption">
<h2>{% blocktrans %}BC Archaeology Portal{% endblocktrans %}</h2>
<h2>{% blocktrans %}BCAP{% endblocktrans %}</h2>
<h3>{% trans "Official Register of Archaeological Sites for British Columbia" %}</h3>
<!-- this is a workaround for a layout issue causing the section to not be limited -->
<h4 class="area-description">
Expand All @@ -364,7 +364,7 @@ <h4 class="area-description">
alt="McAbee Fossil Beds"
/>
<div class="slide-caption bc-splash-caption">
<h2>{% blocktrans %}BC Archaeology Portal{% endblocktrans %}</h2>
<h2>{% blocktrans %}BCAP{% endblocktrans %}</h2>
<h3>{% trans "Official Register of Archaeological Sites for British Columbia" %}</h3>
<!-- this is a workaround for a layout issue causing the section to not be limited -->
<h4 class="area-description">
Expand Down
2 changes: 2 additions & 0 deletions bcap/templates/views/resource/editor.htm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
{% load i18n %}
{% load webpack_static from webpack_loader %}

{% block title %}BCAP - {{ displayname }} - Report{% endblock title %}

{% block graph_header_title %}
{% trans "Resource Editor" %}
{% endblock graph_header_title %}
Expand Down
2 changes: 2 additions & 0 deletions bcap/templates/views/search.htm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "views/search.htm" %}
{% load webpack_static from webpack_loader %}

{% block title %}BCAP - Search{% endblock title %}

{% block css %}
{{ block.super }}
<!-- TEST!!! --->
Expand Down
2 changes: 1 addition & 1 deletion bcap/util/aliases/archaeological_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ArchaeologicalSiteAliases(AbstractAliases):
REFERENCE_TYPE = "reference_type"
REFERENCE_YEAR = "reference_year"
REGISTER_TYPE = "register_type"
REGISTRATION_STATUS = "registration_status"
REGISTRATION_STATUS = "decision_registration_status"
RELATED_DOCUMENT_DESCRIPTION = "related_document_description"
RELATED_DOCUMENT_TYPE = "related_document_type"
RELATED_SITE_DOCUMENTS = "related_site_documents"
Expand Down
Loading