28 m_hlw = setLayout( std::make_unique< Wt::WHBoxLayout >() );
30 m_summaryView = m_hlw-> addWidget( std::make_unique< SummaryWidget >() );
32 m_hlw-> setResizable( 0,
true,
Wt::WLength( 20, Wt::LengthUnit::Percentage ) );
34 auto cw = m_hlw-> addWidget( std::make_unique< Wt::WContainerWidget >() );
38 m_toolBar = cw-> addWidget( std::make_unique< ToolBar >() );
49 m_selectedMonth =
configItem()-> getVarInt(
"selectedMonth" );
50 if( m_selectedMonth < 1
51 || m_selectedMonth > 12 )
56 m_unpaidView = cw-> addWidget( std::make_unique< TableView >( m_selectedMonth,
Status::Unpaid ) );
63 m_selectedIndex = _index;
64 clearSelectionExcept( m_unpaidView );
69 clearSelectionExcept( m_unpaidView );
70 editClicked( m_unpaidView, _index );
84 m_pendingView = cw-> addWidget( std::make_unique< TableView >( m_selectedMonth,
Status::Pending ) );
91 m_selectedIndex = _index;
92 clearSelectionExcept( m_pendingView );
97 clearSelectionExcept( m_pendingView );
98 editClicked( m_pendingView, _index );
105 m_paidView = cw-> addWidget( std::make_unique< TableView >( m_selectedMonth,
Status::Paid ) );
112 m_selectedIndex = _index;
113 clearSelectionExcept( m_paidView );
118 clearSelectionExcept( m_paidView );
119 editClicked( m_paidView, _index );
126 m_inactiveView = cw-> addWidget( std::make_unique< TableView >( m_selectedMonth,
Status::Inactive ) );
133 m_selectedIndex = _index;
134 clearSelectionExcept( m_inactiveView );
139 clearSelectionExcept( m_inactiveView );
140 editClicked( m_inactiveView, _index );
180openEditor(
const std::string & _bpGuid )->
void
193 auto u_ = std::make_unique< GCW::Gui::BillPay::EditWidget >( _bpGuid );
194 m_editWidget = u_.get();
198 m_hlw-> addWidget( std::move( u_ ) );
199 m_hlw-> setResizable( 1,
true,
Wt::WLength( 20, Wt::LengthUnit::Percentage ) );
202 deleted().connect( [=]()
208 saved().connect( [=]()
211 m_hlw-> removeWidget( m_editWidget.get() );
216 canceled().connect( [=]()
218 m_hlw-> removeWidget( m_editWidget.get() );
305 m_selectedMonth = _month;
307 if( m_unpaidView ) m_unpaidView -> setMonth( _month );
308 if( m_pendingView ) m_pendingView -> setMonth( _month );
309 if( m_paidView ) m_paidView -> setMonth( _month );
310 if( m_inactiveView ) m_inactiveView -> setMonth( _month );
311 if( m_summaryView ) m_summaryView -> setMonth( _month );
313 if( m_pendingView-> rowCount() > 0 )
314 m_pendingView-> setHidden(
false );
316 m_pendingView-> setHidden(
true );
318 if( m_paidView-> rowCount() > 0 )
319 m_paidView-> setHidden(
false );
321 m_paidView-> setHidden(
true );
329 do_inactiveClicked();
335 configItem().modify()-> setVar(
"selectedMonth", m_selectedMonth );