Skip to content

Commit

Permalink
Merge pull request #350 from flaxandteal/fix/excavation-issues
Browse files Browse the repository at this point in the history
Fix(Taiga #2033 | License): Fix Excavation Report
  • Loading branch information
taylorn01 authored Jul 19, 2024
2 parents e4eceeb + 3525f87 commit 19340bf
Show file tree
Hide file tree
Showing 6 changed files with 929 additions and 7 deletions.
4 changes: 2 additions & 2 deletions coral/media/js/views/components/plugins/licensing-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,13 @@ define([
{
componentConfigs: [
{
componentName: 'default-card-util', // Has fix for many tiles
componentName: 'excavation-report-step', // Has fix for many tiles
uniqueInstanceName: 'report-info',
tilesManaged: 'many',
parameters: {
graphid: 'cc5da227-24e7-4088-bb83-a564c4331efd',
nodegroupid: 'f060583a-6120-11ee-9fd1-0242ac120003',
resourceid: "['init-step']['app-id'][0]['resourceid']['resourceInstanceId']"
resourceid: "['init-step']['app-id'][0]['resourceid']['resourceInstanceId']",
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ define([
'views/components/workflows/heritage-asset-designation-workflow/ha-summary',
'views/components/workflows/heritage-asset-designation-workflow/start-remap-and-merge',
'views/components/workflows/assign-consultation-workflow/pc-summary',
'views/components/workflows/excavation-license-workflow/excavation-report-step'
], function (ko, arches, OpenableWorkflow, workflowTemplate) {
return ko.components.register('workflow-builder-loader', {
viewModel: function (params) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
define([
'underscore',
'knockout',
'knockout-mapping',
'uuid',
'arches',
'../default-card-util.js',
'templates/views/components/workflows/default-card-util.htm',
], function (_, ko, koMapping, uuid, arches, DefaultCardUtilViewModel, componentTemplate) {
function viewModel(params) {

DefaultCardUtilViewModel.apply(this, [params]);

this.DOCUMENT_REFERENCE_NODE = "d8f74d42-dc6e-11ee-8def-0242ac120006"

params.disableAdd(true)

this.tile.data[this.DOCUMENT_REFERENCE_NODE].subscribe((newValue) => {
if (newValue.en.value != ""){

params.disableAdd(false)
}
})


}

ko.components.register('excavation-report-step', {
viewModel: viewModel,
template: componentTemplate
});

return viewModel;
});
Loading

0 comments on commit 19340bf

Please sign in to comment.