Skip to content

Commit

Permalink
re consultations-prj #27, fixes typos, adds new wkflow step specifica…
Browse files Browse the repository at this point in the history
…lly for ref numbers
  • Loading branch information
whatisgalen committed May 30, 2019
1 parent 4f9b748 commit f494176
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
7 changes: 7 additions & 0 deletions consultations_prj/media/css/project.css
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@
margin: 1px;
}

.workflows-add-reference-numbers {
margin: 5px 25px;
border: solid 1px #acf;
padding: 10px;
background-color: #fff;
}

/* In core core arches */

.file-upload-footer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ define([
'viewmodels/workflow-step',
'views/components/workflows/new-tile-step',
'views/components/workflows/set-tile-value',
'views/components/workflows/get-tile-value'
'views/components/workflows/get-tile-value',
'views/components/workflows/set-reference-numbers'
], function(ko, Workflow, Step) {
return ko.components.register('add-consultation', {
viewModel: function(params) {
Expand Down Expand Up @@ -33,8 +34,15 @@ define([
icon: 'fa-tag'
},
{
title: 'Step 3',
description: 'Another description here',
title: 'Add Ref Numbers',
description: 'step to add ref numbers using new wkflow step',
component: 'set-reference-numbers',
graphid: '08359c2e-53f0-11e9-b212-dca90488358a',
nodegroupid: '3c79d87a-53f2-11e9-a14e-dca90488358a',
resourceid: null,
tileid: null,
parenttileid: null,
icon: 'fa-hashtag'
}
];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
define([
'underscore',
'jquery',
'arches',
'knockout',
'views/components/workflows/add-ref-number-step'
], function(_, $, arches, ko, AddRefStep) {

function viewModel(params) {
AddRefStep.apply(this, [params]);
var self = this;
var urlparams = params.parseUrlParams();
self.tile.subscribe(function(val) {
if(val) {
if(urlparams) {
if (urlparams.applyOutputToTarget) {
val.data[urlparams.targetnode](urlparams.value);
}
}
}
});
};

return ko.components.register('set-reference-numbers', {
viewModel: viewModel,
template: {
require: 'text!templates/views/components/workflows/add-ref-number-step.htm'
}
});
return viewModel;
});

0 comments on commit f494176

Please sign in to comment.