diff --git a/chatbot/data/nlu.md b/chatbot/data/nlu.md index 2e3730b..91e5a1d 100644 --- a/chatbot/data/nlu.md +++ b/chatbot/data/nlu.md @@ -148,7 +148,6 @@ - report for [today](period) please - [Today](period) - [Yesterday](period) -- [Today](period) ## intent:out_of_scope - please help with my ice cream it's dripping diff --git a/frontend/src/app/common/store/configureStore.ts b/frontend/src/app/common/store/configureStore.ts index 2dc7645..11d8229 100644 --- a/frontend/src/app/common/store/configureStore.ts +++ b/frontend/src/app/common/store/configureStore.ts @@ -10,7 +10,6 @@ import {generalSettingsStore} from "app/common/store/settings/reducers"; import {virtualAssistantReducer} from "app/common/store/virtual-assistant/reducers"; import {createBrowserHistory, History} from "history"; import {RootStore} from "app/common/types/store.types"; -import { settingsTrainingReducer } from 'app/modules/settings/fields/settings_training/store/reducer'; export const history = createBrowserHistory(); diff --git a/frontend/src/app/modules/settings/fields/settings_filter/setings_filter.tsx b/frontend/src/app/modules/settings/fields/settings_filter/setings_filter.tsx index 0816fef..ba59e10 100644 --- a/frontend/src/app/modules/settings/fields/settings_filter/setings_filter.tsx +++ b/frontend/src/app/modules/settings/fields/settings_filter/setings_filter.tsx @@ -89,11 +89,7 @@ class SettingsFilter extends Component{ this.setState({status}); } -<<<<<<< HEAD editTableRowData = (index: number) => () => { -======= - editPosition = (index: number) => () => { ->>>>>>> [Settings][Filter] Refactoring let {status} = this.state, dataEdit = {...this.state.settings[index]}; status[index] = FilterElementType.edited; @@ -101,11 +97,7 @@ class SettingsFilter extends Component{ this.setState({status, dataEdit}); }; -<<<<<<< HEAD acceptTableRowEditing = (index: number) => () => { -======= - acceptPositionEditing = (index: number) => () => { ->>>>>>> [Settings][Filter] Refactoring let {settings,status} = this.state; settings[index]={...this.state.dataEdit}; @@ -129,7 +121,6 @@ class SettingsFilter extends Component{ this.detectIsSettingsDefault(); } -<<<<<<< HEAD setDefaultSettings = () => { this.setState(this.getDefaultStateObject()); } @@ -137,34 +128,6 @@ class SettingsFilter extends Component{ saveSettings = () => { this.props.sendSettingsData(this.props.section, this.state.settings); this.detectIsSettingsDefault(true); -======= - clearSettings = () => { - this.setState(this.getDefaultStateObject()); ->>>>>>> [Settings][Filter] Refactoring - } - - getDefaultStateObject = (): SettingsFilterState => ({ - names: [...this.props.defaultSettings[this.props.section].names], - settings: [...this.props.defaultSettings[this.props.section].filter_settings].sort((firstItem: SettingsFilterData, secondItem: SettingsFilterData)=>firstItem.name.toLowerCase().localeCompare(secondItem.name.toLowerCase())), - status: this.props.defaultSettings[this.props.section].filter_settings.map((_:any,index:number)=>this.getTableRowParity(index)), - dataInput: { - name:"", - filtration_type:"", - }, - dataEdit:{ - name:"", - filtration_type:"", - }, - isSettingsDefault: true, - }) - - getTableRowParity = (numb: number) => numb%2===1? FilterElementType.odd: FilterElementType.even; - - detectIsSettingsDefault = (isSettingsDefault: boolean = false) => this.setState({isSettingsDefault}); - - isPositionAcceptButtonValid = (field: "dataInput" | "dataEdit") => { - let data: SettingsFilterData = this.state[field]; - return !(data.name && data.filtration_type); } getDefaultStateObject = (): SettingsFilterState => ({ @@ -191,29 +154,6 @@ class SettingsFilter extends Component{ return !(data.name && data.filtration_type); } - getDefaultStateObject = (): SettingsFilterState => ({ - settings: [...this.props.defaultSettings[this.props.section]], - status: this.props.defaultSettings[this.props.section].map((_:any,index:number)=>this.getTableRowParity(index)), - dataInput: { - name:"", - filtration_type:"", - }, - dataEdit:{ - name:"", - filtration_type:"", - }, - isSettingsDefault: true, - }) - - getTableRowParity = (numb: number) => numb%2===1? FilterElementType.odd: FilterElementType.even; - - detectIsSettingsDefault = (isSettingsDefault: boolean = false) => this.setState({isSettingsDefault}); - - isPositionAcceptButtonValid = (field: "dataInput" | "dataEdit") => { - let data: SettingsFilterData = this.state[field]; - return !(data.name && data.filtration_type); - } - render(){ let excludeNames = this.state.settings.map(item=>item.name); @@ -225,19 +165,12 @@ class SettingsFilter extends Component{

Name

-<<<<<<< HEAD -======= - ->>>>>>> [Settings][Filter] Refactoring
@@ -251,11 +184,7 @@ class SettingsFilter extends Component{ writable={false}/> @@ -271,7 +200,6 @@ class SettingsFilter extends Component{ this.state.settings.map(({name,filtration_type},index)=>(
@@ -282,16 +210,6 @@ class SettingsFilter extends Component{ onChange={this.setFieldData("dataEdit", "name")} dropDownValues={this.state.names} excludeValues={excludeNames.filter(exName=>exName!==name)}/> -======= - onMouseEnter={this.changeHoverStatus(index)} - onMouseLeave={this.changeHoverStatus(index)}> - -
- ->>>>>>> [Settings][Filter] Refactoring
@@ -306,11 +224,7 @@ class SettingsFilter extends Component{ { this.state.status[index] === FilterElementType.edited && diff --git a/frontend/src/app/modules/settings/fields/settings_training/settings_training.tsx b/frontend/src/app/modules/settings/fields/settings_training/settings_training.tsx index 26cb443..30898fe 100644 --- a/frontend/src/app/modules/settings/fields/settings_training/settings_training.tsx +++ b/frontend/src/app/modules/settings/fields/settings_training/settings_training.tsx @@ -49,14 +49,13 @@ class SettingsTraining extends Component{ data.entities.splice(index,1); this.setState({[keyField]:data}); } - setSourceFieldData = (name: string, isAllowedEntitiesEditing: boolean = false) => { let {source_field} = this.state; source_field.source_field=name; this.setState({source_field, isAllowedEntitiesEditing}); this.detectIsSettingsDefault(); - } + } setMarkUpSource = (name: string) => { this.setSourceFieldData(name); @@ -70,18 +69,6 @@ class SettingsTraining extends Component{ }),1000); } - setMarkUpSource = (name: string) => { - this.setSourceFieldData(name); - setTimeout(()=>this.props.sendTrainingData({source_field:name}, TrainingSubSection.source_field) - .then(isAllowedEntitiesEditing=>{ - if(isAllowedEntitiesEditing) { - this.setState({isAllowedEntitiesEditing}); - this.props.getTrainingDataSubField(TrainingSubSection.markup_entities).then(markup_entities=> markup_entities? this.setState({markup_entities}): this.setState({isAllowedEntitiesEditing:false})) - } - - }),1000); - } - clearMarkUpSource = () => { this.setSourceFieldData(""); } diff --git a/frontend/src/app/modules/significant-terms/significant-terms.tsx b/frontend/src/app/modules/significant-terms/significant-terms.tsx index e1c4373..6042531 100644 --- a/frontend/src/app/modules/significant-terms/significant-terms.tsx +++ b/frontend/src/app/modules/significant-terms/significant-terms.tsx @@ -1,4 +1,3 @@ -import { AnalysisAndTrainingApi } from 'app/common/api/analysis-and-training.api'; import { TagCloud } from 'app/common/components/charts/tag-cloud/tag-cloud'; import CircleSpinner from 'app/common/components/circle-spinner/circle-spinner'; import Icon, { IconType } from 'app/common/components/icon/icon';