Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/shridhar-tl/jira-assistant
Browse files Browse the repository at this point in the history
… into package
  • Loading branch information
shridhar-tl committed Aug 6, 2023
2 parents 515dc6e + 33b5ab2 commit 6eed797
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/gadgets/BaseGadget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ div.full-height {
}
}

@media screen and (min-width: 992px) {
@media screen and (min-width: 1200px) {
div.half-width {
width: calc(50% - 4px);
}
}

@media screen and (max-width: 992px) {
@media screen and (max-width: 1200px) {
div.half-width {
width: 100%;
width: calc(100% - 6px);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/layouts/DefaultLayout/NavSideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function NavItem({ menu, pathname }) {

return (
<span className={`menu${isSelected ? ' selected' : ''}`}>
<Link href={menu.url} newTab={menu.external || false}>
<Link href={menu.url} newTab={menu.external || false} data-testid={menu.id}>
<span className="wrapper">
<span className={`icon ${menu.icon}`} />
<span className="menu-text">{menu.name}</span>
Expand Down
29 changes: 16 additions & 13 deletions src/views/dashboard/AddGadget.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,22 @@ async function getGadgetList() {
const { $report } = inject('ReportService');

const reports = await $report.getReportsList();
if (reports && reports.length) {
const list = reports.map(r => ({
id: `${(r.advanced ? "AR" : (r.isNew ? "CR" : "SQ"))}:${r.id}:${r.queryName}`,
icon: "fa fa-filter",
name: r.queryName,
isOld: !(r.isNew || r.advanced),
details: (!r.advanced ?
`${r.outputCount} columns displayed in table format${r.isNew
? ' with interactive option to sort and group based on columns.'
: ' (deprecated, not allowed to add to dashboard)'}`
: "<no details available>")
}));

return [...GadgetList, ...list];
if (!reports?.length) {
return GadgetList;
}

const list = reports.map(r => ({
id: `${(r.advanced ? "AR" : (r.isNew ? "CR" : "SQ"))}:${r.id}:${r.queryName}`,
icon: "fa fa-filter",
name: r.queryName,
isOld: !(r.isNew || r.advanced),
details: (!r.advanced ?
`${r.outputCount} columns displayed in table format${r.isNew
? ' with interactive option to sort and group based on columns.'
: ' (deprecated, not allowed to add to dashboard)'}`
: "<no details available>")
}));

return [...GadgetList, ...list];
}
4 changes: 2 additions & 2 deletions src/views/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ class Dashboard extends PureComponent {

return (
<>
<AddGadget show={showGadgetPanel} onHide={this.hideGadgetDialog} addedGadgets={widgets}
addGadget={this.addGadget} removeGadget={this.removeGadget} />
{!this.isQuickView && <AddGadget show={showGadgetPanel} onHide={this.hideGadgetDialog} addedGadgets={widgets}
addGadget={this.addGadget} removeGadget={this.removeGadget} />}
<div className="dashboard-container">
{!this.isQuickView && <Header {...this.props} config={currentBoard} index={dashboardIndex} userId={this.$session.userId}
onShowGadgets={this.onShowGadgets} tabViewChanged={this.tabViewChanged} isQuickView={this.isQuickView} />}
Expand Down

0 comments on commit 6eed797

Please sign in to comment.