Skip to content

Commit

Permalink
Added "Last Report Date" to Portfolio Overview "Project Status" view (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Petterandre authored Apr 23, 2021
1 parent 9af3097 commit a482bed
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Every change is marked with Pull Request ID.
- Added list 'Tidslinjeinnhold' to portfolio level #437
- Added 'Description' to document templates #379
- Supporting pre-defined template setting #461
- Added "Last Report Date" to Portfolio status overview #393
- Added report created date next to Project Status title

## Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class ProjectStatus extends React.Component<IProjectStatusProps, IProject
</MessageBar>
)}
<div className={`${styles.header} ${styles.column12}`}>
<div className={styles.title}>{this.props.title}</div>
<div className={styles.title}>{this.props.title} - {moment(this.state.selectedReport.created).format('DD.MM.yyyy')} </div>
</div>
<div className={`${styles.sections} ${styles.column12}`} id='pp-statussection'>
{this._renderSections()}
Expand Down Expand Up @@ -418,7 +418,7 @@ export class ProjectStatus extends React.Component<IProjectStatusProps, IProject
if (!this.state.isPublishing) {
try {
const attachment = await this._captureReport(report.values.Title)
const properties = { GtModerationStatus: strings.GtModerationStatus_Choice_Published }
const properties = { GtModerationStatus: strings.GtModerationStatus_Choice_Published, GtLastReportDate: moment().format('YYYY-MM-DD HH:mm') }
await this._portalDataService.updateStatusReport(report.id, properties, attachment)
} catch (error) {
Logger.log({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
<pnp:FieldRef ID="cb41572a-78c6-4e33-8505-b97bfd8fd162" Name="GtStatusGainAchievementComment" />
<pnp:FieldRef ID="9a81b4e1-64ea-40c2-9be1-946f20e78999" Name="GtModerationStatus" />
<pnp:FieldRef ID="fba7ced6-9970-4b14-ab9c-7c809310d86d" Name="GtSiteId" />
<pnp:FieldRef ID="B3004225-79DE-42CC-A4B7-80968A9AFC58" Name="GtLastReportDate"/>
</pnp:FieldRefs>
</pnp:ContentType>
2 changes: 1 addition & 1 deletion Templates/Portfolio/Objects/Lists/Portefoljevisninger.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<pnp:DataValue FieldName="GtSearchQuery">DepartmentId:{{sitecollectionid}} NOT GtProjectLifecycleStatusOWSCHCS="Avsluttet" ContentTypeId:0x0100805E9E4FEAAB4F0EABAB2600D30DB70C*</pnp:DataValue>
<pnp:DataValue FieldName="GtPortfolioIsDefaultView">False</pnp:DataValue>
<pnp:DataValue FieldName="GtPortfolioFabricIcon">BarChart4</pnp:DataValue>
<pnp:DataValue FieldName="GtPortfolioColumns">1,7,8,9,21,25,23,19,27</pnp:DataValue>
<pnp:DataValue FieldName="GtPortfolioColumns">1,7,8,9,21,25,23,19,27,30</pnp:DataValue>
<pnp:DataValue FieldName="GtPortfolioRefiners">5,6,7,8,9</pnp:DataValue>
<pnp:DataValue FieldName="GtPortfolioGroupBy" />
</pnp:DataRow>
Expand Down
13 changes: 13 additions & 0 deletions Templates/Portfolio/Objects/Lists/Prosjektkolonner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,19 @@
<pnp:DataValue FieldName="GtIsRefinable">False</pnp:DataValue>
<pnp:DataValue FieldName="GtIsGroupable">False</pnp:DataValue>
</pnp:DataRow>
<pnp:DataRow> <!-- ID: 30 -->
<pnp:DataValue FieldName="GtSortOrder">300</pnp:DataValue>
<pnp:DataValue FieldName="Title">{resource:SiteFields_GtLastReportDate_DisplayName}</pnp:DataValue>
<pnp:DataValue FieldName="GtInternalName">GtLastReportDate</pnp:DataValue>
<pnp:DataValue FieldName="GtManagedProperty">GtLastReportDateOWSDATE</pnp:DataValue>
<pnp:DataValue FieldName="GtFieldDataType">Date</pnp:DataValue>
<pnp:DataValue FieldName="GtColMinWidth">150</pnp:DataValue>
<pnp:DataValue FieldName="GtShowFieldProjectStatus">False</pnp:DataValue>
<pnp:DataValue FieldName="GtShowFieldFrontpage">False</pnp:DataValue>
<pnp:DataValue FieldName="GtShowFieldPortfolio">False</pnp:DataValue>
<pnp:DataValue FieldName="GtIsRefinable">False</pnp:DataValue>
<pnp:DataValue FieldName="GtIsGroupable">False</pnp:DataValue>
</pnp:DataRow>
</pnp:DataRows>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/Lists/Security/DefaultSecurity.xml" />
</pnp:ListInstance>
1 change: 1 addition & 0 deletions Templates/Portfolio/Objects/SiteFields/@.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/SiteFields/GtIsRefinable.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/SiteFields/GtKey.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/SiteFields/GtLastSyncTime.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/SiteFields/GtLastReportDate.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/SiteFields/GtLccDefault.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/SiteFields/GtLccHidden.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Objects/SiteFields/GtLccDestinationLibrary.xml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Field Description="{resource:SiteFields_GtLastReportDate_Description}" DisplayName="{resource:SiteFields_GtLastReportDate_DisplayName}" Group="{resource:SiteFields_Portfolio_Group}" ID="{B3004225-79DE-42CC-A4B7-80968A9AFC58}" Name="GtLastReportDate" StaticName="GtLastReportDate" Type="DateTime" ShowInEditForm="FALSE" ShowInDisplayForm="FALSE" />
6 changes: 6 additions & 0 deletions Templates/Portfolio/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,12 @@
</data>
<data name="SiteFields_GtPermissionLevel_Description" xml:space="preserve">
<value>Define the SharePoint permission level for the project site.</value>
</data>
<data name="SiteFields_GtLastReportDate_Description" xml:space="preserve">
<value>Last date for published report.</value>
</data>
<data name="SiteFields_GtLastReportDate_DisplayName" xml:space="preserve">
<value>Last report date</value>
</data>
<data name="ProjectPhases_GoToChecklist2" xml:space="preserve">
<value>Gå til &lt;a href="{0" target="_blank"&gt;fasesjekklisten&lt;/a&gt; (åpnes i ny fane)</value>
Expand Down
6 changes: 6 additions & 0 deletions Templates/Portfolio/Resources.no-NB.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,12 @@
<data name="SiteFields_GtPermissionLevel_Description" xml:space="preserve">
<value>Definerer rettighetsnivå på SharePoint-området til prosjektet.</value>
</data>
<data name="SiteFields_GtLastReportDate_Description" xml:space="preserve">
<value>Siste dato for publisert rapport.</value>
</data>
<data name="SiteFields_GtLastReportDate_DisplayName" xml:space="preserve">
<value>Siste rapporteringsdato</value>
</data>
<data name="ProjectPhases_GoToChecklist2" xml:space="preserve">
<value>Gå til &lt;a href="{0" target="_blank"&gt;fasesjekklisten&lt;/a&gt; (åpnes i ny fane)</value>
</data>
Expand Down

0 comments on commit a482bed

Please sign in to comment.