Skip to content

Commit

Permalink
Removing EAO process widget (#2531)
Browse files Browse the repository at this point in the history
  • Loading branch information
VineetBala-AOT authored May 31, 2024
1 parent 0e58785 commit 6d13309
Show file tree
Hide file tree
Showing 27 changed files with 62 additions and 1,409 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## May 30, 2024

- **Feature** Remove EAO process widget [🎟️ DESENG-626](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-626)
- Removed EAO process widget
- Added migration file to remove EAO process widget attached to any existing engagement

## May 29, 2024

- **Bugfix** Null in the public URL [🎟️ DESENG-625](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-625)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""remove_phases_widget_type
Revision ID: f0f7eadf3a40
Revises: ae232e299180
Create Date: 2024-05-30 10:26:56.318088
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'f0f7eadf3a40'
down_revision = 'ae232e299180'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
conn = op.get_bind()
conn.execute('DELETE FROM widget WHERE widget_type_id=3')
conn.execute('DELETE FROM widget_type WHERE id=3')
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
widget_type_table = sa.table('widget_type',
sa.Column('id', sa.Integer),
sa.Column('name', sa.String),
sa.Column('description', sa.String))

op.bulk_insert(widget_type_table, [
{'id': 3, 'name': 'Phases', 'description': 'Displays information about the engagement phase'}
])
# ### end Alembic commands ###
1 change: 0 additions & 1 deletion met-api/src/met_api/constants/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class WidgetType(IntEnum):

WHO_IS_LISTENING = 1
DOCUMENTS = 2
PHASES = 3
SUBSCRIBE = 4
EVENTS = 5
Map = 6
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@ export const WidgetCardSwitch = ({ widget, removeWidget }: WidgetCardSwitchProps
return (
<>
<Switch>
<Case condition={widget.widget_type_id === WidgetType.Phases}>
<MetWidget
sortable={false}
testId={`phases-${widget.widget_type_id}`}
title={widget.title}
onDelete={() => {
removeWidget(widget.id);
}}
onEdit={() => {
handleWidgetDrawerTabValueChange(WidgetTabValues.PHASES_FORM);
handleWidgetDrawerOpen(true);
}}
/>
</Case>
<Case condition={widget.widget_type_id === WidgetType.WhoIsListening}>
<MetWidget
testId={`who-is-listening-${widget.widget_type_id}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { WidgetDrawerContext } from './WidgetDrawerContext';
import { WidgetTabValues } from './type';
import WhoIsListening from './WhoIsListening';
import Documents from './Documents';
import Phases from './Phases';
import EventsForm from './Events';
import MapForm from './Map';
import VideoForm from './Video';
Expand All @@ -31,9 +30,6 @@ const WidgetDrawerTabs = () => {
<TabPanel sx={{ width: '100%' }} value={WidgetTabValues.SUBSCRIBE_FORM}>
<SubscribeForm />
</TabPanel>
<TabPanel sx={{ width: '100%' }} value={WidgetTabValues.PHASES_FORM}>
<Phases />
</TabPanel>
<TabPanel sx={{ width: '100%' }} value={WidgetTabValues.EVENTS_FORM}>
<EventsForm />
</TabPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Divider, Grid } from '@mui/material';
import WhoIsListeningOptionCard from './WhoIsListening/WhoIsListeningOptionCard';
import { MetHeader3 } from 'components/common';
import DocumentOptionCard from './Documents/DocumentOptionCard';
import PhasesOptionCard from './Phases/PhasesOptionCard';
import SubscribeOptionCard from './Subscribe/SubscribeOptionCard';
import EventsOptionCard from './Events/EventsOptionCard';
import MapOptionCard from './Map/MapOptionCard';
Expand All @@ -24,9 +23,6 @@ const WidgetOptionCards = () => {
<Grid item xs={12} lg={6}>
<DocumentOptionCard />
</Grid>
<Grid item xs={12} lg={6}>
<PhasesOptionCard />
</Grid>
<Grid item xs={12} lg={6}>
<SubscribeOptionCard />
</Grid>
Expand Down
Loading

0 comments on commit 6d13309

Please sign in to comment.