|
1 | 1 | <div id="project-details"> |
2 | 2 | </div> |
3 | | -<div id="payment-methods"> |
| 3 | +<div id="schedule-instrument-time"> |
4 | 4 | </div> |
5 | | -<div id="add-payment-method-link"> |
| 5 | +<br/> |
| 6 | +<div id="payment-methods"> |
6 | 7 | </div> |
7 | | -<div id="schedule-instrument-time"> |
| 8 | +<div id="payment-summary"> |
8 | 9 | </div> |
9 | 10 |
|
10 | 11 | <script type="text/javascript" nonce="<%=scriptNonce%>"> |
|
83 | 84 | }); |
84 | 85 |
|
85 | 86 | // query web part to show payment method and other invoice details - custom query |
86 | | - let webpart = <%=webpartContext%>; |
87 | 87 | new LABKEY.QueryWebPart({ |
88 | | - renderTo: 'payment-methods', |
| 88 | + renderTo: 'payment-summary', |
89 | 89 | frame: 'portal', |
90 | | - title: 'Payment Methods', |
| 90 | + title: 'Payment Summary', |
91 | 91 | schemaName: 'targetedms', |
92 | 92 | queryName: 'paymentMethodCostSummary', |
93 | 93 | filterArray: [LABKEY.Filter.create('project', project, LABKEY.Filter.Types.EQUAL)], |
94 | 94 | containerFilter: LABKEY.Query.containerFilter.currentAndSubfolders |
95 | 95 | }); |
96 | 96 |
|
97 | | - // add payment method link |
98 | | - const addPaymentMethodEl = document.getElementById('add-payment-method-link'); |
99 | | - const urlParams = { |
| 97 | + new LABKEY.QueryWebPart({ |
| 98 | + renderTo: 'payment-methods', |
| 99 | + frame: 'portal', |
| 100 | + title: 'Payment Methods', |
100 | 101 | schemaName: 'targetedms', |
101 | | - queryName: 'ProjectPaymentMethod', |
102 | | - returnUrl: LABKEY.ActionURL.buildURL('targetedms', 'msProjectDetails', null, { project: project }) |
103 | | - }; |
104 | | - addPaymentMethodEl.innerHTML = LABKEY.Utils.textLink({text: 'Add payment method', href: LABKEY.ActionURL.buildURL('query', 'insertQueryRow', LABKEY.ActionURL.getContainer(), urlParams)});; |
| 102 | + queryName: 'projectPaymentMethod', |
| 103 | + filterArray: [LABKEY.Filter.create('project', project, LABKEY.Filter.Types.EQUAL)], |
| 104 | + containerFilter: LABKEY.Query.containerFilter.currentAndSubfolders |
| 105 | + }); |
105 | 106 |
|
106 | 107 | const scheduleInstrumentTimeEl = document.getElementById('schedule-instrument-time'); |
107 | 108 | const scheduleUrlParams = { |
|
0 commit comments