Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit 2dfe6bb

Browse files
authored
feat: 🎉 Prettier 2.0 (#104)
1 parent 894105b commit 2dfe6bb

File tree

15 files changed

+45
-165
lines changed

15 files changed

+45
-165
lines changed

force-app/main/default/aura/bundlePath/bundlePathController.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
({
2-
subscribe: function(component, event) {
2+
subscribe: function (component, event) {
33
var empApi = component.find('empApi');
44
var channel = component.get('v.channel');
55
var replayId = -2;
66
empApi.subscribe(
77
channel,
88
replayId,
9-
$A.getCallback(function(message) {
9+
$A.getCallback(function (message) {
1010
var bundle = component.get('v.record');
1111
if (message && message.data && message.data.sobject) {
1212
var bundleId = message.data.sobject.Id;
@@ -19,17 +19,17 @@
1919
);
2020
},
2121

22-
onStepChange: function(component, event) {
22+
onStepChange: function (component, event) {
2323
var bundle = component.get('v.record');
2424
if (bundle) {
2525
bundle.Status__c = event.getParam('step');
2626
component
2727
.find('bundleRecord')
28-
.saveRecord($A.getCallback(function(saveResult) {}));
28+
.saveRecord($A.getCallback(function (saveResult) {}));
2929
}
3030
},
3131

32-
onRecordUpdated: function(component, event) {
32+
onRecordUpdated: function (component, event) {
3333
var changeType = event.getParams().changeType;
3434
if (changeType === 'LOADED') {
3535
component.find('accountService').reloadRecord();

force-app/main/default/aura/expandTemplate/expandTemplateController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
({
2-
toggle: function(component, event, helper) {
2+
toggle: function (component, event, helper) {
33
component.set('v.fullScreen', !component.get('v.fullScreen'));
44
$A.util.toggleClass(component.find('container'), 'fullscreen');
55
var leftColumn = component.find('leftColumn');

force-app/main/default/aura/irrigationManagerWrapper/IrrigationManagerWrapperController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
({
2-
updateFlowData: function(component, event, helper) {
2+
updateFlowData: function (component, event, helper) {
33
if (event.getParam('startTime')) {
44
component.set('v.startTime', event.getParam('startTime'));
55
} else if (event.getParam('duration')) {

force-app/main/default/lwc/bundle/bundle.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
>
3535
Products
3636
</p>
37-
<p class="slds-text-heading_small slds-truncate ">
37+
<p class="slds-text-heading_small slds-truncate">
3838
{bundleItems.length}
3939
</p>
4040
</lightning-layout-item>

force-app/main/default/lwc/bundle/bundle.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class Bundle extends LightningElement {
2525
this.bundleItems = undefined;
2626
} else if (data) {
2727
this.error = undefined;
28-
this.bundleItems = data.map(item => {
28+
this.bundleItems = data.map((item) => {
2929
return {
3030
id: item.Id,
3131
merchandiseId: item.Merchandise__r.Id,
@@ -48,7 +48,7 @@ export default class Bundle extends LightningElement {
4848
.then(() => {
4949
this.calculateBundle();
5050
})
51-
.catch(error => {
51+
.catch((error) => {
5252
this.error = error;
5353
});
5454
}
@@ -59,7 +59,7 @@ export default class Bundle extends LightningElement {
5959
let totalQty = 0;
6060
let totalMSRP = 0;
6161
if (bundleItems && Array.isArray(bundleItems)) {
62-
bundleItems.forEach(bundleItem => {
62+
bundleItems.forEach((bundleItem) => {
6363
totalQty += bundleItem.qty;
6464
totalMSRP += bundleItem.qty * bundleItem.price;
6565
});
@@ -124,12 +124,12 @@ export default class Bundle extends LightningElement {
124124
}
125125
};
126126
createRecord(recordInput)
127-
.then(result => {
127+
.then((result) => {
128128
bundleItem.id = result.id;
129129
this.bundleItems.push(bundleItem);
130130
this.calculateBundle();
131131
})
132-
.catch(error => {
132+
.catch((error) => {
133133
this.error = error;
134134
});
135135
}
@@ -146,7 +146,7 @@ export default class Bundle extends LightningElement {
146146
this.bundleItems = currentBundleItems;
147147
this.calculateBundle();
148148
})
149-
.catch(error => {
149+
.catch((error) => {
150150
this.error = error;
151151
});
152152
}
@@ -167,7 +167,7 @@ export default class Bundle extends LightningElement {
167167
});
168168
this.calculateBundle();
169169
})
170-
.catch(error => {
170+
.catch((error) => {
171171
this.error = error;
172172
});
173173
}

force-app/main/default/lwc/harvestField/harvestField.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ export default class HarvestField extends NavigationMixin(LightningElement) {
149149
recordUpdate.fields.Irrigation__c = event.target.checked;
150150
updateRecord(recordUpdate)
151151
// eslint-disable-next-line no-unused-vars
152-
.then(result => {
152+
.then((result) => {
153153
// leave here, not needed
154154
})
155-
.catch(error => {
155+
.catch((error) => {
156156
this.dispatchEvent(
157157
new ShowToastEvent({
158158
title: 'Error on data save',

force-app/main/default/lwc/harvestFieldList/harvestFieldList.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default class HarvestFieldList extends NavigationMixin(
4646
this.tableData = data;
4747
const map = {};
4848
const items = [];
49-
data.forEach(field => {
49+
data.forEach((field) => {
5050
if (!map[field.Crop__c]) {
5151
map[field.Crop__c] = [];
5252
}
@@ -57,7 +57,7 @@ export default class HarvestFieldList extends NavigationMixin(
5757
});
5858
});
5959

60-
Object.keys(map).forEach(key => {
60+
Object.keys(map).forEach((key) => {
6161
items.push({
6262
label: key,
6363
expanded: false,
@@ -74,11 +74,11 @@ export default class HarvestFieldList extends NavigationMixin(
7474

7575
connectedCallback() {
7676
// EMP API Error handling
77-
onError(error => {
77+
onError((error) => {
7878
this.error = error;
7979
});
8080

81-
subscribe('/event/Field_Status_Change__e', -1, message => {
81+
subscribe('/event/Field_Status_Change__e', -1, (message) => {
8282
this.empMessage = message;
8383
});
8484
}

force-app/main/default/lwc/harvestFieldMap/harvestFieldMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default class HarvestFieldMap extends LightningElement {
5757
this.template.translateX = 0;
5858
this.template.translateY = 0;
5959

60-
this.template.addEventListener('mouseup', event => {
60+
this.template.addEventListener('mouseup', (event) => {
6161
const classList = event.target.classList;
6262
let fieldId;
6363

@@ -74,7 +74,7 @@ export default class HarvestFieldMap extends LightningElement {
7474
} else if (fieldId.value.substring(0, 5) === 'field') {
7575
if (!event.shiftKey) {
7676
// Unselect fields that are currently selected
77-
this.selectedFields.forEach(selectedField => {
77+
this.selectedFields.forEach((selectedField) => {
7878
selectedField.style.strokeWidth = 0;
7979
});
8080
this.selectedFields = [];

force-app/main/default/lwc/harvestFieldMapNav/harvestFieldMapNav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class HarvestFieldMapNav extends NavigationMixin(
5050
const fieldId = event.target.classList.value;
5151
if (fieldId && fieldId.substring(0, 5) === 'field') {
5252
const mapId = fieldId.substring(5);
53-
this.wiredHarvestFields.data.forEach(field => {
53+
this.wiredHarvestFields.data.forEach((field) => {
5454
if (field.Map_Id__c === mapId) {
5555
this[NavigationMixin.Navigate]({
5656
type: 'standard__recordPage',

force-app/main/default/lwc/irrigationDialog/irrigationDialog.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ export default class IrrigationDialog extends LightningElement {
1111
const selectedFields = this.selectedHarvestFields;
1212

1313
const options = [];
14-
fields.forEach(field => {
14+
fields.forEach((field) => {
1515
options.push({
1616
value: field.Id,
1717
label: field.Name
1818
});
1919
});
2020

2121
const value = [];
22-
selectedFields.forEach(field => {
22+
selectedFields.forEach((field) => {
2323
value.push(field.Id);
2424
});
2525
this.options = options;
@@ -34,7 +34,7 @@ export default class IrrigationDialog extends LightningElement {
3434
const selectedIds = this.value;
3535
const fields = [];
3636

37-
this.harvestFields.forEach(harvestField => {
37+
this.harvestFields.forEach((harvestField) => {
3838
if (selectedIds.indexOf(harvestField.Id) > -1) {
3939
fields.push({
4040
id: harvestField.Id,

0 commit comments

Comments
 (0)