Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aura/sdg/sdg.cmp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<aura:attribute name="filtersize" type="String" />

<lightning:flexipageRegionInfo width="{!v.width}" />
<lightning:workspaceAPI aura:id="workspace"/>

<!-- Events -->
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
Expand Down Expand Up @@ -346,4 +347,4 @@
</div>
</aura:if>

</aura:component>
</aura:component>
1 change: 1 addition & 0 deletions aura/sdg/sdgController.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

helper.getSDG(component);
helper.getNamespace(component);
helper.setTabTitle(component, event, helper);
},
handleObjectManagerEvent: function(component, event, helper) {},
paging: function(component, event, helper) {
Expand Down
37 changes: 36 additions & 1 deletion aura/sdg/sdgHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,5 +481,40 @@
}

this.FireEvent(component, actionid, selectedrow);
}
},

setTabTitle: function (component, event, helper) {
let workspaceAPI = component.find("workspace");
workspaceAPI.isConsoleNavigation().then(isConsoleNavigation => {
if (isConsoleNavigation) {
workspaceAPI.getEnclosingTabId().then(tabId => {
if (tabId !== false) {
workspaceAPI.isSubtab({
tabId: tabId
}).then(isSubTab => {
// Only set the tab label if it is a subtab (otherwise it overwrites the primary object tab name)
if (isSubTab) {
workspaceAPI.getTabInfo({
tabId: tabId
}).then(info => {
// Only update the tab if it is a standard__component
if (/standard__component/i.test(info.pageReference.type)) {
workspaceAPI.setTabLabel({
'tabId': tabId,
'label': component.get("v.TitleName")
});
workspaceAPI.setTabIcon({
'tabId': tabId,
'icon': component.get("v.SVGName"),
'iconAlt': component.get("v.TitleName")
})
}
});
}
})
}
});
}
});
}
});
25 changes: 24 additions & 1 deletion aura/sdgDatagridCell/sdgDatagridCellController.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,18 @@
component,
helper.formatDurationDateTime(component, datevalue)
);
} else {
} else if (fieldstyle === "Numeric Date") {
helper.CreateCmp(
component,
"lightning:formattedDateTime",
{
value: datevalue,
year: "numeric",
month: "2-digit",
day: "numeric"
}
);
} else {
//Render this date WITHOUT a timezone
helper.CreateCmp(
component,
Expand Down Expand Up @@ -155,6 +166,18 @@
component,
helper.formatDurationDateTime(component, datetimevalue)
);
} else if (fieldstyle === "Numeric Date") {
var timezone = $A.get("$Locale.timezone");
helper.CreateCmp(component, "lightning:formattedDateTime", {
value: datetimevalue,
timeZone: timezone,
year: "numeric",
month: "2-digit",
day: "numeric",
hour: "numeric",
minute: "numeric",
second: "numeric"
});
} else {
var timezone = $A.get("$Locale.timezone");
helper.CreateCmp(component, "lightning:formattedDateTime", {
Expand Down
5 changes: 5 additions & 0 deletions objects/SDG_Field__c.object
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@
<default>false</default>
<label>CTI</label>
</value>
<value>
<fullName>Numeric Date</fullName>
<default>false</default>
<label>Numeric Date</label>
</value>
</valueSetDefinition>
</valueSet>
</fields>
Expand Down