-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into expect-button-enabled
- Loading branch information
Showing
19 changed files
with
2,336 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<div data-ppid="1003d965-cb80-30fa-1020-83bae673e396" class="row sectionBlockLayout sectionPrimaryColor" style="display: flex; flex-wrap: wrap; height: 15px; min-height: 15px; padding: 8px; margin: 0px;"></div> | ||
<div data-ppid="df73fcea-dace-db33-05a9-631efd69edef" class="row sectionBlockLayout text-left" style="display: flex; flex-wrap: wrap; margin: 0px; min-height: 374px; padding: 8px; background-color: rgb(255, 255, 255);"> | ||
<div data-ppid="a56a155d-2ae1-2fd4-88b3-def7d92988aa" class="container" style="display: flex; flex-wrap: wrap;"> | ||
<p>Please note that the system only allows for one active application at a time. To start a new application, any unsubmitted draft must first be deleted.</p> | ||
<div data-ppid="2b7c0fa4-2337-4b3a-750b-a24b5e2175ee" class="col-md-12 columnBlockLayout" style="word-break: break-word; flex-grow: 1; display: flex; flex-direction: column; min-width: 300px; padding: 16px; margin: 60px 0px;">{% include 'entity_list' key: 'My Application List' %}</div> | ||
<div data-ppid="a56a155d-2ae1-2fd4-88b3-def7d92988aa" class="container" style="display: flex; flex-wrap: wrap; margin-top: 30px;"> | ||
<p>To edit/submit an application, please click on the drop down arrow.</p> | ||
<div data-ppid="2b7c0fa4-2337-4b3a-750b-a24b5e2175ee" class="col-md-12 columnBlockLayout" style="word-break: break-word; flex-grow: 1; display: flex; flex-direction: column; min-width: 300px; padding: 16px; margin: 30px 0px;">{% include 'entity_list' key: 'My Application List' %}</div> | ||
</div> | ||
</div> |
137 changes: 137 additions & 0 deletions
137
assets/staffportal/webresources/quartech_claimseligibleexpensegrid.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<!-- | ||
------------------- | ||
FILE INFO | ||
------------------- | ||
version: 1.0.1 | ||
name: Claims Eligible Expense Grid | ||
type: Web Resource (HTML Content) | ||
description: This is the HTML content used to render the elgible expense grid on Staff Portal. | ||
--> | ||
<html> | ||
<head> | ||
<script | ||
source="ClientGlobalContext.js.aspx" | ||
type="text/javascript" | ||
></script> | ||
|
||
<link | ||
rel="stylesheet" | ||
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" | ||
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" | ||
crossorigin="anonymous" | ||
/> | ||
|
||
<script type="text/javascript"> | ||
function onLoad() { | ||
console.log('WebResource version: 1.0.1'); | ||
loadjQuery(() => { | ||
loadPowerpod(() => { | ||
let rows = JSON.stringify([ | ||
{ | ||
type: '', | ||
description: '', | ||
amount: '', | ||
}, | ||
]); | ||
|
||
if ( | ||
parent?.Xrm?.Page && | ||
parent?.Xrm?.Page.getControl('quartech_eligibleexpenses') | ||
) { | ||
// Get the form context | ||
var formContext = parent.Xrm.Page; | ||
const fetchedRowValues = formContext | ||
.getControl('quartech_eligibleexpenses') | ||
.getAttribute() | ||
.getValue(); | ||
|
||
if (fetchedRowValues && fetchedRowValues !== '[]') { | ||
rows = fetchedRowValues; | ||
} | ||
|
||
formContext | ||
.getControl('quartech_eligibleexpenses') | ||
.setVisible(false); | ||
} | ||
|
||
const customElement = document.getElementsByTagName( | ||
'expense-report-table' | ||
)?.[0]; | ||
|
||
const columns = JSON.stringify([ | ||
{ | ||
id: 'type', | ||
name: 'Expense Type', | ||
width: '35%', | ||
}, | ||
{ | ||
id: 'description', | ||
name: 'Description', | ||
width: '50%', | ||
}, | ||
{ | ||
id: 'amount', | ||
name: 'Amount ($CAD)', | ||
width: '15%', | ||
}, | ||
]); | ||
customElement.setAttribute('columns', columns); | ||
customElement.setAttribute('rows', rows); | ||
}); | ||
}); | ||
} | ||
|
||
function loadPowerpod(callback) { | ||
const src = | ||
'https://cdn.jsdelivr.net/gh/bcgov/nr-af-pods@dev/powerpod/releases/powerpod-1.5.1.min.js'; | ||
const script = document.createElement('script'); | ||
script.setAttribute('async', ''); | ||
script.src = src; | ||
document.head.appendChild(script); | ||
|
||
// Check if Powerpod is loaded | ||
script.onload = function () { | ||
if (typeof window.powerpod !== 'undefined') { | ||
console.log('Powerpod loaded successfully'); | ||
if (callback && typeof callback === 'function') { | ||
callback(); | ||
} | ||
} else { | ||
console.error('Failed to load Powerpod'); | ||
} | ||
}; | ||
} | ||
|
||
function loadjQuery(callback) { | ||
// Create a script element | ||
var script = document.createElement('script'); | ||
script.type = 'text/javascript'; | ||
script.src = 'https://code.jquery.com/jquery-3.6.2.min.js'; | ||
script.async = false; // This ensures the script is loaded synchronously | ||
|
||
// Append the script to the head | ||
document.head.appendChild(script); | ||
|
||
// Check if jQuery is loaded | ||
script.onload = function () { | ||
if (typeof jQuery !== 'undefined') { | ||
console.log('jQuery loaded successfully'); | ||
if (callback && typeof callback === 'function') { | ||
callback(); | ||
} | ||
} else { | ||
console.error('Failed to load jQuery'); | ||
} | ||
}; | ||
} | ||
</script> | ||
</head> | ||
|
||
<body | ||
onload="onLoad()" | ||
onfocusout="parent.setEmailRange();" | ||
style="overflow-wrap: break-word" | ||
> | ||
<expense-report-table readOnly="true"></expense-report-table> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.