Skip to content

Commit

Permalink
NTR - Fixed eslint complains
Browse files Browse the repository at this point in the history
  • Loading branch information
cyl3x committed Dec 9, 2024
1 parent cc3252b commit c0debc8
Show file tree
Hide file tree
Showing 52 changed files with 133 additions and 160 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default (() => {
// eslint-disable-next-line no-undef
const context = require.context('./svg', false, /svg$/);

return context.keys().map((item) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class SwagPayPalPosSettingApiService extends ApiService {
'WRITE:PRODUCT',
];

// eslint-disable-next-line max-len
return `https://my.izettle.com/apps/api-keys?name=Shopware%20integration&scopes=${scopes.join('%20')}&utm_source=local_partnership&utm_medium=ecommerce&utm_campaign=shopware`;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type HandleOptions = {
errorResponse: PayPal.ServiceError;
formatMessage?: (translatedMessage: string, error: PayPal.HttpError) => string;
title?: string;
}
};

const UnknownError: PayPal.HttpError = {
code: 'UNKNOWN',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,53 +57,53 @@

{% block sw_first_run_wizard_paypal_credentials_client_id %}
<sw-text-field
v-model:value="config['SwagPayPal.settings.clientId']"
v-show="!sandboxMode"
v-model:value="config['SwagPayPal.settings.clientId']"
:label="$tc('swag-paypal-frw-credentials.labelClientId')"
@update:value="onCredentialsChanged"
/>
{% endblock %}

{% block sw_first_run_wizard_paypal_credentials_client_secret %}
<sw-text-field
v-model:value="config['SwagPayPal.settings.clientSecret']"
v-show="!sandboxMode"
v-model:value="config['SwagPayPal.settings.clientSecret']"
:label="$tc('swag-paypal-frw-credentials.labelClientSecret')"
@update:value="onCredentialsChanged"
/>
{% endblock %}

{% block sw_first_run_wizard_paypal_credentials_merchant_id %}
<sw-text-field
v-model:value="config['SwagPayPal.settings.merchantPayerId']"
v-show="!sandboxMode"
v-model:value="config['SwagPayPal.settings.merchantPayerId']"
:label="$tc('swag-paypal-frw-credentials.labelMerchantPayerId')"
@update:value="onCredentialsChanged"
/>
{% endblock %}

{% block sw_first_run_wizard_paypal_credentials_client_id_sandbox %}
<sw-text-field
v-model:value="config['SwagPayPal.settings.clientIdSandbox']"
v-show="sandboxMode"
v-model:value="config['SwagPayPal.settings.clientIdSandbox']"
:label="$tc('swag-paypal-frw-credentials.labelClientIdSandbox')"
@update:value="onCredentialsChanged"
/>
{% endblock %}

{% block sw_first_run_wizard_paypal_credentials_client_secret_sandbox %}
<sw-text-field
v-model:value="config['SwagPayPal.settings.clientSecretSandbox']"
v-show="sandboxMode"
v-model:value="config['SwagPayPal.settings.clientSecretSandbox']"
:label="$tc('swag-paypal-frw-credentials.labelClientSecretSandbox')"
@update:value="onCredentialsChanged"
/>
{% endblock %}

{% block sw_first_run_wizard_paypal_credentials_merchant_id_sandbox %}
<sw-text-field
v-model:value="config['SwagPayPal.settings.merchantPayerIdSandbox']"
v-show="sandboxMode"
v-model:value="config['SwagPayPal.settings.merchantPayerIdSandbox']"
:label="$tc('swag-paypal-frw-credentials.labelMerchantPayerIdSandbox')"
@update:value="onCredentialsChanged"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% block swag_paypal_overview_card %}
<sw-sales-channel-config
v-model:value="config"
ref="swagPayPalConfigComponent"
v-model:value="config"
domain="SwagPayPal.settings"
>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default Shopware.Component.wrapComponentConfig({
computed: {
disableActiveSwitch(): boolean {
// @ts-expect-error - paymentMethod is from extended component
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access -- paymentMethod is from extended component
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- paymentMethod is from extended component
return !this.acl.can('payment.editor') || this.needsOnboarding(this.paymentMethod.id);
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<template #title>
<div class="sw-card__title">
{{ $tc('swag-paypal-settings-shipping-carrier.cardTitle') }}
<sw-help-text :text="$tc('swag-paypal-settings-shipping-carrier.cardHelpText')"></sw-help-text>
<sw-help-text :text="$tc('swag-paypal-settings-shipping-carrier.cardHelpText')" />
</div>
</template>
{% endblock %}

{% block sw_settings_shipping_detail_paypal_default_carrier_description %}
<div
v-html="$tc('swag-paypal-settings-shipping-carrier.description')"
class="swag-paypal-settings-shipping-carrier__description"
v-html="$tc('swag-paypal-settings-shipping-carrier.description')"
/>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{% endblock %}

{% block swag_paypal_disputes_detail_content_details_fields_separator %}
<hr class="swag-paypal-disputes-detail__separator"/>
<hr class="swag-paypal-disputes-detail__separator">
{% endblock %}

{% block swag_paypal_disputes_detail_content_details_fields_id %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,32 @@ export default Shopware.Component.wrapComponentConfig({
disputeStates: [
{
value: DISPUTE_STATE_REQUIRED_ACTION,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
label: this.formatTechnicalText(DISPUTE_STATE_REQUIRED_ACTION),
},
{
value: DISPUTE_STATE_REQUIRED_OTHER_PARTY_ACTION,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
label: this.formatTechnicalText(DISPUTE_STATE_REQUIRED_OTHER_PARTY_ACTION),
},
{
value: DISPUTE_STATE_UNDER_PAYPAL_REVIEW,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
label: this.formatTechnicalText(DISPUTE_STATE_UNDER_PAYPAL_REVIEW),
},
{
value: DISPUTE_STATE_RESOLVED,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
label: this.formatTechnicalText(DISPUTE_STATE_RESOLVED),
},
{
value: DISPUTE_STATE_OPEN_INQUIRIES,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
label: this.formatTechnicalText(DISPUTE_STATE_OPEN_INQUIRIES),
},
{
value: DISPUTE_STATE_APPEALABLE,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
label: this.formatTechnicalText(DISPUTE_STATE_APPEALABLE),
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

{% block swag_paypal_disputes_list_content %}
<template #content>
<sw-loader v-if="isLoading"/>
<sw-loader v-if="isLoading" />
<template v-else>

{% block swag_paypal_disputes_list_content_grid %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:label="$tc('swag-paypal-payment.captureAction.maxAmount')"
:disabled="true"
>
<template #suffix v-if="currencyCode">
<template v-if="currencyCode" #suffix>
{{ currencyCode }}
</template>
</sw-text-field>
Expand All @@ -24,7 +24,7 @@
:min="0"
:label="$tc('swag-paypal-payment.captureAction.currentAmount')"
>
<template #suffix v-if="currencyCode">
<template v-if="currencyCode" #suffix>
{{ currencyCode }}
</template>
</sw-number-field>
Expand Down Expand Up @@ -69,6 +69,6 @@
</template>
{% endblock %}

<sw-loader v-if="isLoading"/>
<sw-loader v-if="isLoading" />
</sw-modal>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
</template>
{% endblock %}

<sw-loader v-if="isLoading"/>
<sw-loader v-if="isLoading" />
</sw-modal>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

</template>

<sw-loader v-if="isLoading" size="43px"/>
<sw-loader v-if="isLoading" size="43px" />
</sw-modal>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
</template>
{% endblock %}

<sw-loader v-if="isLoading"/>
<sw-loader v-if="isLoading" />
</sw-modal>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
</template>
{% endblock %}

<sw-loader v-if="isLoading"/>
<sw-loader v-if="isLoading" />
</sw-modal>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% block swag_paypal_payment_actions_section %}
<sw-card-section secondary slim>
<swag-paypal-payment-actions :orderId="orderId" :paymentResource="paymentResource"/>
<swag-paypal-payment-actions :orderId="orderId" :paymentResource="paymentResource" />
</sw-card-section>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
>

<template v-if="hasPrefix" #sw-contextual-field-prefix="{ disabled, identification }">
<slot name="prefix" v-bind="{disabled, identification}"/>
<slot name="prefix" v-bind="{disabled, identification}" />
</template>

<template #sw-field-input="{ identification, error, disabled, size, setFocusClass, removeFocusClass, hasSuffix, hasPrefix }">
<input
v-bind="$attrs"
v-on="additionalListeners"
:id="identification"
type="text"
:name="identification"
:id="identification"
:disabled="disabled"
:value="currentValue"
:placeHolder="placeholder"
v-on="additionalListeners"
@input="onInput"
@change="onChange"
@focus="setFocusClass"
Expand All @@ -29,7 +29,7 @@
</template>

<template v-if="copyable || hasSuffix" #sw-contextual-field-suffix="{disabled, identification}">
<slot name="suffix" v-bind="{ identification }"/>
<slot name="suffix" v-bind="{ identification }" />
<sw-field-copyable
v-if="copyable"
:displayName="identification"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
/>

<div
v-html="payPalCarrierDescription"
class="swag-paypal-order-carrier__description"
v-html="payPalCarrierDescription"
/>
</div>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</div>

<div
v-html="payPalCarrierDescription"
class="sw-user-card__paypal-carrier-description"
v-html="payPalCarrierDescription"
/>
</dd>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
{% block swag_paypal_pos_account_grid_container_status_label_badge %}
<sw-color-badge class="swag-paypal-pos-account__status-color-badge"
rounded
:variant="connectionStatusVariant">
</sw-color-badge>
:variant="connectionStatusVariant" />
{% endblock %}

{% block swag_paypal_pos_account_grid_container_status_label_text %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
v-bind="$attrs"
class="swag-paypal-pos-boolean-radio"
:name="name"
:options="options">
</sw-radio-field>
:options="options" />
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
:page="page"
:total="total"
:total-visible="7"
@page-change="onPageChange">
</sw-pagination>
@page-change="onPageChange" />
</template>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% block swag_paypal_pos_getting_started_reader_image %}
<img class="swag-paypal-pos-getting-started__image"
:src="assetFilter('swagpaypal/static/img/paypal-pos-reader.png')"
:alt="$tc('swag-paypal-pos.gettingStarted.readerImageAlt')"/>
:alt="$tc('swag-paypal-pos.gettingStarted.readerImageAlt')">
{% endblock %}

{% block swag_paypal_pos_getting_started_reader_description %}
Expand Down Expand Up @@ -51,7 +51,7 @@
{% block swag_paypal_pos_getting_started_app_image %}
<img class="swag-paypal-pos-getting-started__image"
:src="assetFilter('swagpaypal/static/img/paypal-pos-app.png')"
:alt="$tc('swag-paypal-pos.gettingStarted.appImageAlt')"/>
:alt="$tc('swag-paypal-pos.gettingStarted.appImageAlt')">
{% endblock %}

{% block swag_paypal_pos_getting_started_app_description %}
Expand All @@ -64,9 +64,8 @@
{% endblock %}

{% block swag_paypal_pos_getting_started_app_description_text %}
<div v-html="$tc('swag-paypal-pos.gettingStarted.appText')"
class="swag-paypal-pos-getting-started__description-text">
</div>
<div class="swag-paypal-pos-getting-started__description-text"
v-html="$tc('swag-paypal-pos.gettingStarted.appText')" />
{% endblock %}
</div>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@

{% block swag_paypal_pos_status_view_actions %}
<template #actions>
<slot name="actions"></slot>
<slot name="actions" />
</template>
{% endblock %}

{% block swag_paypal_pos_status_view_detail %}
<template #detail v-if="isSyncing">
<template v-if="isSyncing" #detail>

{% block swag_paypal_pos_status_view_detail_syncing %}
{{ $tc('swag-paypal-pos.detail.overview.status.syncingDetail') }}
{% endblock %}
</template>

<template #detail v-if="!isSyncing && lastFinishedRun">
<template v-if="!isSyncing && lastFinishedRun" #detail>
<div>
{% block swag_paypal_pos_status_view_detail_static %}
{{ $tc('swag-paypal-pos.detail.overview.status.lastSynced') }}:
Expand All @@ -46,15 +46,17 @@
:closable="true"
:title="$tc('swag-paypal-pos.detail.overview.syncErrorTitle')">
<ul>
<li v-for="error in syncErrors">{{ error.detail }} ({{ error.code }})</li>
<li v-for="error in syncErrors">
{{ error.detail }} ({{ error.code }})
</li>
</ul>
</sw-alert>
{% endblock %}
</template>
{% endblock %}

{% block swag_paypal_pos_status_view_substatus %}
<template #substatus v-if="incompleteLastRun">
<template v-if="incompleteLastRun" #substatus>
{{ $tc('swag-paypal-pos.detail.overview.status.lastSyncedComplete') }}:
{{ dateFilter(lastCompleteRun.updatedAt, {
hour: '2-digit',
Expand Down
Loading

0 comments on commit c0debc8

Please sign in to comment.