Skip to content

Commit

Permalink
v3.2 hotfix for add to channel as tab issue (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-saikirang authored Oct 1, 2024
1 parent e0a898d commit db3942e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 2 additions & 3 deletions EOC-TeamsFx/tabs/src/components/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ class Dashboard extends React.PureComponent<IDashboardProps, IDashboardState> {
console.log(constants.infoLogPrefix + "All Incidents retrieved");

// Redirect to current Incident Active Dashboard component
if (this.props.fromActiveDashboardTab) {
const activeIncident = allIncidents.find((e: any) => e.incidentId === parseInt(this.props.activeDashboardIncidentId));
const activeIncident = allIncidents.find((e: any) => e.incidentId === parseInt(this.props.activeDashboardIncidentId));
if (this.props.fromActiveDashboardTab && activeIncident !== undefined) {
this.props.onShowActiveBridge(activeIncident);
}

else {
// filter for Planning tab
const planningIncidents = allIncidents.filter((e: any) => e.incidentStatusObj.status === constants.planning);
Expand Down
15 changes: 10 additions & 5 deletions EOC-TeamsFx/tabs/src/components/TabConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import * as microsoftTeams from "@microsoft/teams-js";
class TabConfig extends React.Component {
render() {
// Initialize the Microsoft Teams SDK
microsoftTeams.app.initialize();

microsoftTeams.app.initialize().then(() => {

/**
* When the user clicks "Save", save the url for your configured tab.
* This allows for the addition of query string parameters based on
Expand All @@ -35,13 +36,17 @@ class TabConfig extends React.Component {
* dialog.
*/
microsoftTeams.pages.config.setValidityState(true);

}).catch((error) => {
console.error("TEOC_TabConfig_Error_Initializing Microsoft Teams SDK:", error);

});

return (
<div>
<h1>Tab Configuration</h1>
<div>
This is where you will add your tab configuration options the user can choose when the tab
is added to your team/group chat.
<h1> Microsoft Teams Emergency Operations Center</h1>
<div>
App Template to help facilitate the creation of teams and assets for incident response for designated scenarios. In addition to quick team creation and asset deployment, TEOC also delivers a central dashboard to see and manage incidents from and take further action. Helping you to respond and act quicker powered by the solutions you already have.
</div>
</div>
);
Expand Down

0 comments on commit db3942e

Please sign in to comment.