remove selected period logic from appViewState