</div>

          </div>

          </Dialog>
          :
          null
          }
            <Dialog contentClassName={_s.dialogColor} titleStyle={ModuleStyle.dialogTitle} title="Are you sure you want to delete all services?"
                    open={this.state.deleteDialog}
                    onRequestClose = {() => this.handleDeleteClose()}>
              <RaisedButton secondary={true} style={ModuleStyle.button}
                label = "Delete all"
                onClick = { () => this.deleteAll()}
              />
              <RaisedButton primary={true}
                label = "Cancel"
                onClick = { () => this.handleDeleteClose()}
              />

            </Dialog>
        </Paper>
      );
    }
}

export default mapAndConnect(AdminPage, {
  imService: IManagedService
})
            <Divider className={_s.divider} />

            <div>
              <h3 className={_s.subTitle}>Place</h3>
              <ListInput min={0} onChange={(v) => {this.onFieldChange("place", v)}}
                         count={this.state.formValues.place.length}
                         values={this.state.formValues.place}
                         component={PlaceList} />
            </div>

            <Divider className={_s.divider} />

            {/*Submit button, redirects to services page*/}
            <div className={_s.submit}>
              <RaisedButton onClick={()=> {
                this.submitService();
              }}  label="Submit" primary={true} disabled={!isEnabled}/>
              {this.state.success ? <Redirect to="/services" /> : null}
            </div>

          </div>
        </Paper>

      );
    }
}
export default mapAndConnect(ServiceForm, {
  imService: IManagedService
})
                <Route path='/services' exact={true} render={(props) => <AdminPage user={this.state.user} {...props} />}/>
                <Route path= '/services/new' exact={true} render={(props) => <ServiceForm {...props} />}/>
                <Route path= '/services/edit/:id' exact={true} render={(props) => <ServiceEditForm {...props} />}/>
                <Route path= '/services/:id' exact={true} render={(props) => <DetailView user={this.state.user} {...props} />}/>
              </Switch>
            </div>
          );
        }}/>
      </Switch>
      {redirect}

      <Snackbar
        open={this.state.showErrorSnack}
        message={this.state.lastError}
        autoHideDuration={4000}
        onRequestClose={() => this.hideError()}
      />

      </div>

    )
  }
}


export default mapAndConnect(App, {
  auth: IAuthService,
  error: ErrorService,
  imService: IManagedService
})