-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Admin): Run prettier on js files
Adjust the syntax of all admin js files to prettier config.
- Loading branch information
Showing
15 changed files
with
78 additions
and
78 deletions.
There are no files selected for viewing
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
4 changes: 2 additions & 2 deletions
4
admin/app/components/solidus_admin/orders/show/address/component.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { Controller } from '@hotwired/stimulus' | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
static targets = ["addresses"] | ||
|
||
close() { | ||
this.addressesTarget.removeAttribute('open') | ||
this.addressesTarget.removeAttribute("open") | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Controller } from '@hotwired/stimulus' | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
closeMenus() { | ||
this.element.querySelectorAll('details').forEach(details => details.removeAttribute('open')) | ||
this.element.querySelectorAll("details").forEach((details) => details.removeAttribute("open")) | ||
} | ||
} |
9 changes: 5 additions & 4 deletions
9
admin/app/components/solidus_admin/orders/show/customer_search/component.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import { Controller } from '@hotwired/stimulus' | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
static values = { customersUrl: String } | ||
|
||
async search({ detail: { query, controller } }) { | ||
controller.resultsValue = | ||
(await (await fetch(`${this.customersUrlValue}?q[name_or_variants_including_master_sku_cont]=${query}`)).text()) | ||
controller.resultsValue = await ( | ||
await fetch(`${this.customersUrlValue}?q[name_or_variants_including_master_sku_cont]=${query}`) | ||
).text() | ||
} | ||
|
||
submit(event) { | ||
event.detail.resultTarget.querySelector('form').submit() | ||
event.detail.resultTarget.querySelector("form").submit() | ||
} | ||
} |
7 changes: 4 additions & 3 deletions
7
admin/app/components/solidus_admin/stock_items/edit/component.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
import { Controller } from '@hotwired/stimulus' | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
static values = { | ||
initialCountOnHand: Number, | ||
} | ||
|
||
static targets = ['countOnHand', 'quantityAdjustment'] | ||
static targets = ["countOnHand", "quantityAdjustment"] | ||
|
||
connect() { | ||
this.updateCountOnHand() | ||
} | ||
|
||
updateCountOnHand() { | ||
this.countOnHandTarget.value = parseInt(this.initialCountOnHandValue) + parseInt(this.quantityAdjustmentTarget.value) | ||
this.countOnHandTarget.value = | ||
parseInt(this.initialCountOnHandValue) + parseInt(this.quantityAdjustmentTarget.value) | ||
} | ||
} |
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
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
7 changes: 3 additions & 4 deletions
7
admin/app/components/solidus_admin/ui/forms/input/component.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import { Controller } from '@hotwired/stimulus' | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
static values = { | ||
customValidity: String, | ||
} | ||
|
||
connect() { | ||
if (this.customValidityValue) | ||
this.element.setCustomValidity(this.customValidityValue) | ||
if (this.customValidityValue) this.element.setCustomValidity(this.customValidityValue) | ||
} | ||
|
||
clearCustomValidity() { | ||
this.element.setCustomValidity('') | ||
this.element.setCustomValidity("") | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Controller } from "@hotwired/stimulus"; | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
connect() { | ||
this.element.showModal(); | ||
this.element.showModal() | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.