Skip to content

Commit

Permalink
Merge pull request #718 from mercycorps/2820-editable-program-admin-l…
Browse files Browse the repository at this point in the history
…ight

Update add program button conditional logic.
  • Loading branch information
andrethomas6 authored Oct 21, 2022
2 parents 6b1f9dc + ac93173 commit 316c64f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/pages/tola_management_pages/program/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const IndexView = observer(
</header>
<div className="admin-list__controls">
<BulkActions primaryOptions={bulk_actions.primary_options} secondaryOptions={bulk_actions.secondary_options}/>
{window.location.href.toLowerCase().includes('demo') || window.location.href.toLowerCase().includes('dev') || window.location.href.toLowerCase().includes('localhost') &&
{["demo", "dev", "local"].reduce((editable, env) => { if(!editable) return editable = window.location.href.includes(env) }, false) &&
<div className="controls__buttons">
<a href="#" className="btn btn-link btn-add" tabIndex="0" onClick={() => store.createProgram()}>
<i className="fas fa-plus-circle"/>{gettext("Add Program")}
Expand Down

0 comments on commit 316c64f

Please sign in to comment.