File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/fragments/forms/map-form/components/optimization/components/edit-dialog Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,13 @@ export default {
139
139
}
140
140
return jsonSkills
141
141
} ,
142
+ editDataJson ( ) {
143
+ const jsonData = [ ]
144
+ for ( const data of this . editData ) {
145
+ jsonData . push ( data . toJSON ( ) )
146
+ }
147
+ return jsonData
148
+ } ,
142
149
} ,
143
150
created ( ) {
144
151
if ( this . editProp === 'jobs' ) {
@@ -158,8 +165,7 @@ export default {
158
165
this . editId = this . index
159
166
}
160
167
//create a string of data as copy
161
- this . dataCopy = JSON . stringify ( this . editData )
162
- this . skillsCopy = JSON . stringify ( this . editSkills )
168
+ this . dataCopy = JSON . stringify ( this . editDataJson )
163
169
164
170
// close editJobs box to pick a place from the map
165
171
EventBus . $on ( 'pickAPlace' , ( ) => {
@@ -240,13 +246,10 @@ export default {
240
246
if ( this . content . item === 'Vehicle' ) {
241
247
this . validateTimeWindow ( )
242
248
}
243
- /* if(JSON.stringify(this.editSkills) !== this.skillsCopy){
244
- TODO: update skills
245
- }*/
246
249
if ( this . hasEmptyLocation ) {
247
250
this . showError ( this . content . emptyLoc , { timeout : 3000 } )
248
251
} else {
249
- if ( JSON . stringify ( this . editData ) !== this . dataCopy ) {
252
+ if ( JSON . stringify ( this . editDataJson ) !== this . dataCopy ) {
250
253
this . $emit ( this . content . changedEvent , this . editData )
251
254
}
252
255
this . closeEditModal ( )
You can’t perform that action at this time.
0 commit comments