Created
February 13, 2022 00:25
-
-
Save dmaksimov/03e8b0df3ea81ac2064c05751a9f0a97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fillWithSampleData() { | |
this.form.series_id = 1 | |
this.originalSeriesId = 1 | |
this.form.color_id = 2 | |
this.form.items.doors.push(this.newItem({ | |
style_id: 1, | |
back_id: 1, | |
drill_for_hinges: true, | |
hinge_position: null, | |
finger_pull: true, | |
quantity: 1, | |
width: this.form.unit_of_measure === 'in' ? 10 : Math.round(convert(10).from('in').to('mm')), | |
height: this.form.unit_of_measure === 'in' ? 10 : Math.round(convert(10).from('in').to('mm')), | |
glass: true, | |
lites: 1, | |
grain_direction: 'horizontal', | |
notes: 'Item 1', | |
edit_mode: false, | |
})) | |
this.form.items.doors.push(this.newItem({ | |
style_id: 2, | |
back_id: 2, | |
drill_for_hinges: false, | |
hinge_position: null, | |
finger_pull: false, | |
quantity: 1, | |
width: this.form.unit_of_measure === 'in' ? 15 : Math.round(convert(15).from('in').to('mm')), | |
height: this.form.unit_of_measure === 'in' ? 18 : Math.round(convert(18).from('in').to('mm')), | |
glass: false, | |
lites: 1, | |
grain_direction: 'vertical', | |
notes: '', | |
edit_mode: false, | |
})) | |
this.form.items.drawers.push(this.newItem({ | |
style_id: 1, | |
back_id: 1, | |
drill_for_hinges: true, | |
hinge_position: null, | |
finger_pull: true, | |
quantity: 1, | |
width: this.form.unit_of_measure === 'in' ? 10 : Math.round(convert(10).from('in').to('mm')), | |
height: this.form.unit_of_measure === 'in' ? 10 : Math.round(convert(10).from('in').to('mm')), | |
glass: true, | |
lites: 1, | |
grain_direction: 'horizontal', | |
notes: 'Item 1', | |
edit_mode: false, | |
})) | |
this.form.items.drawers.push(this.newItem({ | |
style_id: 2, | |
back_id: 2, | |
drill_for_hinges: false, | |
hinge_position: null, | |
finger_pull: false, | |
quantity: 1, | |
width: this.form.unit_of_measure === 'in' ? 15 : Math.round(convert(15).from('in').to('mm')), | |
height: this.form.unit_of_measure === 'in' ? 18 : Math.round(convert(18).from('in').to('mm')), | |
glass: false, | |
lites: 1, | |
grain_direction: 'vertical', | |
notes: '', | |
edit_mode: false, | |
})) | |
this.form.items.accessories.push(this.newAccessory({ | |
accessory_id: 1, | |
back_id: 0, | |
quantity: 1, | |
width: 0, | |
height: 0, | |
notes: 'accessory 1', | |
edit_mode: false, | |
})) | |
this.form.items.accessories.push(this.newAccessory({ | |
accessory_id: 4, | |
back_id: 0, | |
quantity: 2, | |
width: this.form.unit_of_measure === 'in' ? 10 : Math.round(convert(10).from('in').to('mm')), | |
height: this.form.unit_of_measure === 'in' ? 15 : Math.round(convert(15).from('in').to('mm')), | |
notes: '', | |
edit_mode: false | |
})) | |
this.form.items.accessories.push(this.newAccessory({ | |
accessory_id: 2, | |
back_id: 2, | |
grain_direction: 'horizontal', | |
quantity: 3, | |
width: this.form.unit_of_measure === 'in' ? 10 : Math.round(convert(10).from('in').to('mm')), | |
height: this.form.unit_of_measure === 'in' ? 15 : Math.round(convert(15).from('in').to('mm')), | |
notes: 'Accessory 3', | |
edit_mode: false | |
})) | |
this.form.items.accessories.push(this.newAccessory({ | |
accessory_id: 3, | |
back_id: 2, | |
grain_direction: 'vertical', | |
quantity: 4, | |
width: this.form.unit_of_measure === 'in' ? 12 : Math.round(convert(12).from('in').to('mm')), | |
height: this.form.unit_of_measure === 'in' ? 5 : Math.round(convert(5).from('in').to('mm')), | |
notes: '', | |
edit_mode: false | |
})) | |
this.form.comments = 'Lectus velit volutpat vivamus tristique posuere mauris aliquam eget neque, nam penatibus bibendum dui vitae phasellus erat senectus amet, fames etiam fringilla fermentum tempor primis accumsan torquent.' | |
this.form.rush_order = 'true' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment