-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance: subscription design revamp #1470
enhance: subscription design revamp #1470
Conversation
…tion_design_revamp
…tion_design_revamp
…tion_design_revamp
no items design php to vue
…tion_design_revamp
…tion_design_revamp
Caution Review failedThe pull request is closed. WalkthroughThis update significantly enhances the subscription management system in a WordPress application. It introduces new Vue.js components and refines state management with Pinia, improving the overall user experience. The styles have been modernized using Tailwind CSS, and the code structure has transitioned from jQuery to Vue.js, resulting in a more interactive and maintainable system. Additionally, new API functionalities have been implemented for improved subscription handling. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VueComponent
participant API
participant Store
User->>VueComponent: Interacts with subscription UI
VueComponent->>Store: Update subscription data
Store->>API: Request to modify subscription
API->>Store: Return success/failure
Store->>VueComponent: Update UI accordingly
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 27
Outside diff range, codebase verification and nitpick comments (12)
assets/js/stores/fieldDependency.js (1)
1-1
: Consider using single quotes for consistency.The project might have a style guide that prefers single quotes for strings. Ensure consistency across the codebase.
- import {defineStore} from 'pinia'; + import { defineStore } from 'pinia';assets/js/stores/component.js (1)
1-1
: Consider using single quotes for consistency.The project might have a style guide that prefers single quotes for strings. Ensure consistency across the codebase.
- import {defineStore} from 'pinia'; + import { defineStore } from 'pinia';assets/js/stores/quickEdit.js (1)
1-2
: Consider using single quotes for consistency.The project might have a style guide that prefers single quotes for strings. Ensure consistency across the codebase.
- import {defineStore} from 'pinia'; - import {ref} from 'vue'; + import { defineStore } from 'pinia'; + import { ref } from 'vue';assets/js/components/subscriptions/SectionInnerField.vue (2)
21-23
: Improve readability with self-closing tag.The
div
tag can be self-closed for better readability since it does not contain any child elements.- <div - v-show="showField" - class="wpuf-grid wpuf-grid-cols-3"> + <div v-show="showField" class="wpuf-grid wpuf-grid-cols-3" />
11-17
: EnsurehiddenFields
is reactive.The
hiddenFields
property independencyStore
is currently defined as a plain array, which is not reactive. To ensure the computed propertyshowField
works correctly,hiddenFields
should be made reactive usingref
orreactive
.
assets/js/components/subscriptions/Subsection.vue
:hiddenFields
is defined as a plain array.Analysis chain
Ensure dependency store is reactive.
The computed property
showField
depends on thedependencyStore.hiddenFields
. EnsurehiddenFields
is a reactive property.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `hiddenFields` in `dependencyStore` is reactive. # Test: Search for `hiddenFields` definition. Expect: `ref` or `reactive` usage. rg --type js --type vue $'hiddenFields'Length of output: 66
Script:
#!/bin/bash # Description: Verify that `hiddenFields` in `dependencyStore` is reactive. # Test: Search for `hiddenFields` definition. Expect: `ref` or `reactive` usage. rg --type js --glob '*.vue' $'hiddenFields'Length of output: 692
assets/js/components/subscriptions/Edit.vue (2)
43-47
: Avoid magic numbers.The timeout value
3000
should be defined as a constant for better readability and maintainability.- setTimeout(() => { + const NOTIFICATION_TIMEOUT = 3000; + setTimeout(() => { - }, 3000); + }, NOTIFICATION_TIMEOUT);
56-57
: Improve readability with self-closing tag.The
div
tag can be self-closed for better readability since it does not contain any child elements.- <div - :class="subscriptionStore.isUnsavedPopupOpen ? 'wpuf-blur' : ''" - class="wpuf-px-12"> + <div :class="subscriptionStore.isUnsavedPopupOpen ? 'wpuf-blur' : ''" class="wpuf-px-12" />assets/js/components/subscriptions/Empty.vue (1)
18-23
: Improve readability with self-closing tag.The
div
tag can be self-closed for better readability since it does not contain any child elements.- <div class="wpuf-flex wpuf-items-center wpuf-justify-center wpuf-h-[50vh] wpuf-justify-center"> + <div class="wpuf-flex wpuf-items-center wpuf-justify-center wpuf-h-[50vh] wpuf-justify-center" />includes/Admin/List_Table_Subscribers.php (2)
Line range hint
62-62
:
Fix typo in comment.There is a typo in the comment: "ncessary" should be "necessary".
- // only ncessary because we have sample data + // only necessary because we have sample data
14-16
: Review the necessity of the#[AllowDynamicProperties]
attribute.The
#[AllowDynamicProperties]
attribute is present but appears unnecessary as there are no dynamic properties being assigned within theList_Table_Subscribers
class. The$page_status
attribute is correctly used to handle URL parameters.
- File:
includes/Admin/List_Table_Subscribers.php
- Lines: 14-16
Suggested Action:
- Remove the
#[AllowDynamicProperties]
attribute if it is not required for dynamic property assignments within this class.Analysis chain
Ensure correct usage of dynamic properties and new attribute.
Verify that the
#[AllowDynamicProperties]
attribute and the newprotected $page_status
attribute are correctly used and necessary for the class functionality.
To ensure that
$page_status
is correctly used and dynamic properties are necessary, we need to inspect the full usage of$page_status
within theList_Table_Subscribers
class and check for any dynamic property assignments.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `#[AllowDynamicProperties]` attribute and the new `protected $page_status` attribute are correctly used and necessary for the class functionality. # Test: Search for the usage of dynamic properties and `page_status`. Expect: Both are used within the class. rg --type php 'AllowDynamicProperties|page_status'Length of output: 464
Script:
#!/bin/bash # Search for all usages of $page_status within the List_Table_Subscribers class rg --type php '\$page_status' -A 5 # Check for any dynamic property assignments within the List_Table_Subscribers class rg --type php '\$this->' includes/Admin/List_Table_Subscribers.phpLength of output: 1094
assets/js/components/subscriptions/InfoCard.vue (1)
2-4
: Consider Import Optimization.If some of these imports are not used in the final code, consider removing them to optimize the import statements.
assets/js/components/subscriptions/QuickEdit.vue (1)
2-11
: Consider Import Optimization.If some of these imports are not used in the final code, consider removing them to optimize the import statements.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
assets/js/subscriptions.min.js
is excluded by!**/*.min.js
temp.svg
is excluded by!**/*.svg
Files selected for processing (52)
- .gitignore (1 hunks)
- Gruntfile.js (5 hunks)
- admin/template.php (2 hunks)
- assets/css/admin.css (3 hunks)
- assets/css/admin/subscriptions.css (1 hunks)
- assets/css/admin/subscriptions.min.css (1 hunks)
- assets/js/components/Header.vue (1 hunks)
- assets/js/components/ProBadge.vue (1 hunks)
- assets/js/components/ProTooltip.vue (1 hunks)
- assets/js/components/Subscriptions.vue (1 hunks)
- assets/js/components/subscriptions/Edit.vue (1 hunks)
- assets/js/components/subscriptions/Empty.vue (1 hunks)
- assets/js/components/subscriptions/InfoCard.vue (1 hunks)
- assets/js/components/subscriptions/List.vue (1 hunks)
- assets/js/components/subscriptions/ListHeader.vue (1 hunks)
- assets/js/components/subscriptions/New.vue (1 hunks)
- assets/js/components/subscriptions/Notice.vue (1 hunks)
- assets/js/components/subscriptions/Pagination.vue (1 hunks)
- assets/js/components/subscriptions/Popup.vue (1 hunks)
- assets/js/components/subscriptions/QuickEdit.vue (1 hunks)
- assets/js/components/subscriptions/SectionInnerField.vue (1 hunks)
- assets/js/components/subscriptions/SectionInputField.vue (1 hunks)
- assets/js/components/subscriptions/SidebarMenu.vue (1 hunks)
- assets/js/components/subscriptions/SubscriptionBox.vue (1 hunks)
- assets/js/components/subscriptions/SubscriptionsDetails.vue (1 hunks)
- assets/js/components/subscriptions/Subsection.vue (1 hunks)
- assets/js/components/subscriptions/Unsaved.vue (1 hunks)
- assets/js/components/subscriptions/UpdateButton.vue (1 hunks)
- assets/js/stores/component.js (1 hunks)
- assets/js/stores/fieldDependency.js (1 hunks)
- assets/js/stores/notice.js (1 hunks)
- assets/js/stores/quickEdit.js (1 hunks)
- assets/js/stores/subscription.js (1 hunks)
- assets/js/subscriptions-old.js (1 hunks)
- assets/js/subscriptions.js (1 hunks)
- assets/less/admin.less (3 hunks)
- assets/tailwind/subscriptions.css (1 hunks)
- class/subscription.php (1 hunks)
- includes/API.php (1 hunks)
- includes/Admin/Admin_Subscription.php (15 hunks)
- includes/Admin/Forms/Admin_Form_Builder.php (2 hunks)
- includes/Admin/Forms/Admin_Template.php (2 hunks)
- includes/Admin/Forms/Post/Templates/Post_Form_Template_WooCommerce.php (1 hunks)
- includes/Admin/List_Table_Subscribers.php (1 hunks)
- includes/Admin/List_Table_Transactions.php (1 hunks)
- includes/Admin/Menu.php (2 hunks)
- includes/Admin/Subscription.php (4 hunks)
- includes/Admin/Upgrades.php (1 hunks)
- includes/Admin/template-parts/subscription-header.php (1 hunks)
- includes/Admin/template-parts/subscription-no-item.php (1 hunks)
- includes/Admin/views/subscriptions.php (1 hunks)
- includes/Api/Subscription.php (1 hunks)
Files not processed due to max files limit (12)
- includes/Assets.php
- includes/Fields/Field_Contract.php
- includes/Free/Free_Loader.php
- includes/Setup_Wizard.php
- includes/upgrades/upgrade-4.0.8.php
- languages/wp-user-frontend.pot
- package.json
- postcss.config.js
- tailwind.config.js
- vite.config.mjs
- wpuf-functions.php
- wpuf.php
Files skipped from review due to trivial changes (10)
- .gitignore
- admin/template.php
- assets/css/admin.css
- assets/css/admin/subscriptions.css
- assets/less/admin.less
- assets/tailwind/subscriptions.css
- class/subscription.php
- includes/Admin/Forms/Admin_Template.php
- includes/Admin/Forms/Post/Templates/Post_Form_Template_WooCommerce.php
- includes/Admin/views/subscriptions.php
Additional context used
Biome
assets/js/stores/subscription.js
[error] 31-31: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 35-35: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 51-51: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 55-55: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 89-89: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.The declaration is defined in this switch clause:
Unsafe fix: Wrap the declaration in a block.
(lint/correctness/noSwitchDeclarations)
[error] 90-90: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 176-176: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 185-185: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 192-192: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 204-204: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 210-210: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 252-252: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 257-257: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
Additional comments not posted (132)
assets/js/stores/fieldDependency.js (1)
3-9
: LGTM!The store definition is clear and follows Pinia's best practices. No issues found.
assets/js/stores/component.js (1)
3-10
: LGTM!The store definition is clear and follows Pinia's best practices. No issues found.
assets/js/stores/quickEdit.js (1)
4-11
: LGTM!The store definition is clear and follows Pinia's best practices. No issues found.
assets/js/subscriptions.js (6)
1-2
: Correct Import StatementsThe imports for Vue and Pinia are correctly set up.
4-4
: Correct Component ImportThe
Subscriptions
component is imported correctly.
6-6
: Correct CSS ImportThe CSS file for subscriptions is imported correctly.
8-8
: Potential Issue with Global VariableThe global variable
wpufSubscriptions
is assigned towindow
, but its value is not defined in this file.Ensure that
wpufSubscriptions
is defined elsewhere in the codebase before this script runs.
10-11
: Correct Initialization of Pinia and Vue AppThe Pinia store and Vue app are correctly initialized.
13-15
: Correct Usage of Pinia and Mounting Vue AppThe Pinia store is used correctly, and the Vue app is mounted to the correct DOM element.
assets/js/stores/notice.js (2)
1-1
: Correct Import StatementThe import for
defineStore
from Pinia is correctly set up.
3-16
: Well-Defined Notice StoreThe notice store is well-defined with state and actions for adding and removing notices.
includes/API.php (4)
1-7
: Correct Namespace and Use StatementsThe namespace and use statements are correctly set up.
8-16
: Well-Defined Class with TraitsThe class is well-defined and uses the
ContainerTrait
correctly.
17-26
: Correct Constructor ImplementationThe constructor initializes the subscription and sets up the REST API initialization action correctly.
28-40
: Correct API Initialization MethodThe
init_api
method correctly initializes and registers API routes.includes/Admin/template-parts/subscription-no-item.php (1)
1-25
: Ensure proper escaping of output.The PHP
esc_html_e
function is used correctly to escape the output. This is crucial for preventing XSS attacks.includes/Admin/template-parts/subscription-header.php (1)
1-21
: Ensure proper escaping of output.The PHP
esc_html_e
function is used correctly to escape the output. This is crucial for preventing XSS attacks.assets/js/components/ProBadge.vue (1)
1-8
: Ensure proper use of Vue component structure.The Vue component structure is correct. The SVG element is properly defined.
assets/js/components/subscriptions/SectionInnerField.vue (2)
6-9
: Validate prop types.Ensure that
parentField
andfieldId
props have appropriate types and default values if necessary.- const props = defineProps( { - parentField: Object, - fieldId: String, - } ); + const props = defineProps({ + parentField: { + type: Object, + required: true + }, + fieldId: { + type: String, + required: true + } + });
25-27
: Ensure labelfor
attribute matches inputid
.Verify that
parentField.name
corresponds to theid
of the input field withinSectionInputField
.Verification successful
Ensure label
for
attribute matches inputid
.The
parentField.name
used for thefor
attribute in the label corresponds to thefield.name
used for theid
attribute in the input fields within theSectionInputField
component. Thus, thefor
attribute correctly matches theid
attribute.
SectionInnerField.vue
SectionInputField.vue
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `parentField.name` matches the input field `id` in `SectionInputField`. # Test: Search for `SectionInputField` component and inspect input field `id`. Expect: Matching `id`. rg --type vue --type js $'<input'Length of output: 62
Script:
#!/bin/bash # Locate the SectionInputField component fd 'SectionInputField.vue' # Inspect the id attribute of the input field within the SectionInputField component rg 'id=' $(fd 'SectionInputField.vue')Length of output: 411
Script:
#!/bin/bash # Search for the usage and definition of `parentField` in SectionInnerField.vue rg 'parentField' assets/js/components/subscriptions/SectionInnerField.vue # Search for the usage and definition of `field` in SectionInputField.vue rg 'field' assets/js/components/subscriptions/SectionInputField.vueLength of output: 5440
assets/js/components/subscriptions/Empty.vue (1)
9-14
: Validate prop type.Ensure that the
message
prop has an appropriate type and default value.- const props = defineProps( { - message: { - type: String, - default: __( 'No Subscription created yet!', 'wp-user-frontend' ), - }, - } ); + const props = defineProps({ + message: { + type: String, + default: __( 'No Subscription created yet!', 'wp-user-frontend' ), + } + });assets/js/components/subscriptions/New.vue (2)
61-71
: Template looks good!The template is well-structured and follows best practices.
2-8
: Ensure all imports are necessary.Review the necessity of each import to avoid unused dependencies.
Verification successful
Let's correct the file type specification for Vue files in the
rg
command and re-run the script to verify the usage of each import.
All imports are necessary and correctly used.
The verification confirms that each imported module and component in
assets/js/components/subscriptions/New.vue
is utilized within the file.
SubscriptionsDetails
is used in the template.useComponentStore
,useSubscriptionStore
, anduseNoticeStore
are used to create store instances.onBeforeMount
andref
are used for lifecycle hooks and reactive references.UpdateButton
is used in the template.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if all imported modules and components are used in the file. # Test: Search for the usage of each imported module/component. Expect: All imports are used. rg --type vue -A 5 $'SubscriptionsDetails|useComponentStore|useSubscriptionStore|onBeforeMount|ref|UpdateButton|useNoticeStore'Length of output: 156
Script:
#!/bin/bash # Description: Verify if all imported modules and components are used in the file. # Test: Search for the usage of each imported module/component. Expect: All imports are used. rg --glob '*.vue' -A 5 'SubscriptionsDetails|useComponentStore|useSubscriptionStore|onBeforeMount|ref|UpdateButton|useNoticeStore'Length of output: 32580
assets/js/components/subscriptions/Notice.vue (2)
2-23
: Setup script looks good!The props are correctly defined and variables are properly initialized.
24-50
: Template looks good!The template is well-structured and follows best practices.
assets/js/components/Header.vue (2)
9-45
: Template looks good!The template is well-structured and follows best practices.
2-7
: Ensure all imports are necessary.Review the necessity of each import to avoid unused dependencies.
Verification successful
All imports in the
Header.vue
file are necessary.Both
__
from@wordpress/i18n
andinject
fromvue
are utilized within the file.
__
is used for localization.inject
is used to injectwpufSubscriptions
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if all imported modules are used in the file. # Test: Search for the usage of each imported module. Expect: All imports are used. rg --type vue -A 5 $'__|inject'Length of output: 60
Script:
#!/bin/bash # Locate the Header.vue file and search for the usage of the imported modules. # Locate the Header.vue file fd Header.vue # Search for the usage of the imported modules within the Header.vue file rg '__|inject' $(fd Header.vue)Length of output: 1746
assets/js/components/subscriptions/Unsaved.vue (2)
1-4
: LGTM!The script setup block correctly imports the
__
function for internationalization.
5-32
: LGTM!The template block is well-structured and follows best practices for Vue components. The use of Tailwind CSS classes ensures consistent styling, and the buttons emit events correctly.
assets/js/components/subscriptions/SubscriptionsDetails.vue (2)
1-42
: LGTM!The script setup block is well-structured and follows best practices for Vue components. The use of reactive state and dependency injection is appropriate.
45-74
: LGTM!The template block is well-structured and follows best practices for Vue components. The use of Tailwind CSS classes ensures consistent styling, and the v-for loops and conditional rendering are correctly implemented.
assets/js/components/subscriptions/UpdateButton.vue (2)
1-16
: LGTM!The script setup block is well-structured and follows best practices for Vue components. The use of props and reactive state is appropriate.
17-48
: LGTM!The template block is well-structured and follows best practices for Vue components. The use of Tailwind CSS classes ensures consistent styling, and the button and dropdown menu are correctly implemented.
assets/js/components/subscriptions/ListHeader.vue (2)
1-39
: LGTM! Verify the necessity of imported modules.The script setup section is well-structured and follows best practices.
However, ensure that all imported modules are necessary and used.
Verification successful
LGTM! All imported modules are necessary and used.
The script setup section is well-structured and follows best practices. No issues found with the imports.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the necessity of imported modules. # Test: Search for the usage of each imported module. Expect: All imported modules are used in the file. rg --type vue -A 5 $'import {__} from \'@wordpress/i18n\' import {storeToRefs} from \'pinia\' import {useComponentStore} from \'../../stores/component\' import {computed, ref} from \'vue\' import {useSubscriptionStore} from \'../../stores/subscription\''Length of output: 758
Script:
#!/bin/bash # Description: Verify the necessity of imported modules by searching for their usage individually. # Test: Search for the usage of each imported module. Expect: All imported modules are used in the file. # Check usage of __ from @wordpress/i18n rg --type vue '__' -g 'assets/js/components/subscriptions/ListHeader.vue' # Check usage of storeToRefs from pinia rg --type vue 'storeToRefs' -g 'assets/js/components/subscriptions/ListHeader.vue' # Check usage of useComponentStore from ../../stores/component rg --type vue 'useComponentStore' -g 'assets/js/components/subscriptions/ListHeader.vue' # Check usage of computed and ref from vue rg --type vue 'computed' -g 'assets/js/components/subscriptions/ListHeader.vue' rg --type vue 'ref' -g 'assets/js/components/subscriptions/ListHeader.vue' # Check usage of useSubscriptionStore from ../../stores/subscription rg --type vue 'useSubscriptionStore' -g 'assets/js/components/subscriptions/ListHeader.vue'Length of output: 648
Script:
#!/bin/bash # Description: Verify the necessity of imported modules by searching for their usage individually. # Test: Search for the usage of each imported module. Expect: All imported modules are used in the file. # Check usage of __ from @wordpress/i18n rg '__' assets/js/components/subscriptions/ListHeader.vue # Check usage of storeToRefs from pinia rg 'storeToRefs' assets/js/components/subscriptions/ListHeader.vue # Check usage of useComponentStore from ../../stores/component rg 'useComponentStore' assets/js/components/subscriptions/ListHeader.vue # Check usage of computed and ref from vue rg 'computed' assets/js/components/subscriptions/ListHeader.vue rg 'ref' assets/js/components/subscriptions/ListHeader.vue # Check usage of useSubscriptionStore from ../../stores/subscription rg 'useSubscriptionStore' assets/js/components/subscriptions/ListHeader.vueLength of output: 1341
40-61
: LGTM! Verify the button click event handling.The template section is well-structured and follows best practices.
However, ensure that the button click event is handled correctly.
assets/js/components/subscriptions/Subsection.vue (2)
1-49
: LGTM! Verify the necessity of imported modules.The script setup section is well-structured and follows best practices.
However, ensure that all imported modules are necessary and used.
Verification successful
LGTM! All imported modules are necessary and used.
The script setup section is well-structured, and all imported modules are utilized within the file.
inject
,provide
,ref
, andtoRefs
from 'vue' are used to manage state and dependencies.SectionInputField
andSectionInnerField
components are used within the template.useFieldDependencyStore
is used to manage field dependencies.ProBadge
andProTooltip
components are used within the template.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the necessity of imported modules. # Test: Search for the usage of each imported module. Expect: All imported modules are used in the file. rg --type vue -A 5 $'import {inject, onMounted, provide, ref, toRefs} from \'vue\' import SectionInputField from \'./SectionInputField.vue\' import SectionInnerField from \'./SectionInnerField.vue\' import {useFieldDependencyStore} from \'../../stores/fieldDependency\' import ProBadge from \'../ProBadge.vue\' import ProTooltip from \'../ProTooltip.vue\''Length of output: 967
Script:
#!/bin/bash # Description: Verify the necessity of imported modules. # Test: Search for the usage of each imported module individually. Expect: All imported modules are used in the file. # Check usage of vue imports rg --type vue 'inject' -A 5 rg --type vue 'onMounted' -A 5 rg --type vue 'provide' -A 5 rg --type vue 'ref' -A 5 rg --type vue 'toRefs' -A 5 # Check usage of SectionInputField rg --type vue 'SectionInputField' -A 5 # Check usage of SectionInnerField rg --type vue 'SectionInnerField' -A 5 # Check usage of useFieldDependencyStore rg --type vue 'useFieldDependencyStore' -A 5 # Check usage of ProBadge rg --type vue 'ProBadge' -A 5 # Check usage of ProTooltip rg --type vue 'ProTooltip' -A 5Length of output: 605
Script:
#!/bin/bash # Description: Verify the necessity of imported modules. # Locate the specific file file_path=$(fd Subsection.vue) # Test: Search for the usage of each imported module individually within the located file. Expect: All imported modules are used in the file. # Check usage of vue imports rg 'inject' -A 5 $file_path rg 'onMounted' -A 5 $file_path rg 'provide' -A 5 $file_path rg 'ref' -A 5 $file_path rg 'toRefs' -A 5 $file_path # Check usage of SectionInputField rg 'SectionInputField' -A 5 $file_path # Check usage of SectionInnerField rg 'SectionInnerField' -A 5 $file_path # Check usage of useFieldDependencyStore rg 'useFieldDependencyStore' -A 5 $file_path # Check usage of ProBadge rg 'ProBadge' -A 5 $file_path # Check usage of ProTooltip rg 'ProTooltip' -A 5 $file_pathLength of output: 5420
50-93
: LGTM! Verify the button click event and field rendering.The template section is well-structured and follows best practices.
However, ensure that the button click event and field rendering are handled correctly.
Verification successful
Verification Successful: Button Click Event and Field Rendering
The button click event and field rendering are handled correctly in the codebase.
- The
@click="closed = !closed"
event is present, confirming the button click functionality.- The
v-for="(field, fieldId) in fields"
loop is present, confirming the field rendering functionality.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the button click event and field rendering. # Test: Search for the handling of the button click event and field rendering. Expect: The button click event and field rendering are handled correctly. rg --type vue -A 5 $'@click="closed = !closed" v-for="(field, fieldId) in fields"'Length of output: 275
Script:
#!/bin/bash # Description: Verify the button click event and field rendering. # Test: Search for the handling of the button click event and field rendering. Expect: The button click event and field rendering are handled correctly. rg --type vue --multiline -A 5 $'@click="closed = !closed" v-for="(field, fieldId) in fields"'Length of output: 123
Script:
#!/bin/bash # Description: Verify the button click event and field rendering. # Find all .vue files and search for the button click event and field rendering. fd -e vue -x rg --multiline -A 5 $'@click="closed = !closed" v-for="(field, fieldId) in fields"' {}Length of output: 102
Script:
#!/bin/bash # Description: Verify the button click event and field rendering separately. # Find all .vue files and search for the @click event. fd -e vue -x rg --multiline -A 5 '@click="closed = !closed"' {} # Find all .vue files and search for the v-for loop. fd -e vue -x rg --multiline -A 5 'v-for="(field, fieldId) in fields"' {}Length of output: 630
Script:
#!/bin/bash # Description: Verify the field rendering by searching for any v-for loops. # Find all .vue files and search for any v-for loops. fd -e vue -x rg --multiline 'v-for=' {}Length of output: 537
includes/Admin/Upgrades.php (1)
27-27
: LGTM! Verify the existence of the upgrade file.The new entry for version '4.0.8' is consistent with the existing entries.
However, ensure that the upgrade file 'upgrades/upgrade-4.0.8.php' exists.
Verification successful
The upgrade file 'includes/upgrades/upgrade-4.0.8.php' exists.
The new entry for version '4.0.8' in 'includes/Admin/Upgrades.php' is consistent and correct.
- Verified the existence of 'includes/upgrades/upgrade-4.0.8.php'.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the upgrade file. # Test: Search for the upgrade file. Expect: The upgrade file 'upgrades/upgrade-4.0.8.php' exists. fd 'upgrade-4.0.8.php'Length of output: 58
assets/js/components/subscriptions/SidebarMenu.vue (2)
1-6
: LGTM!The imports and store initialization are appropriate.
8-63
: Ensure consistent class naming convention.The class names use a prefix
wpuf-
, which is good for consistency. Verify that this convention is followed throughout the project.Verification successful
Class naming convention is consistently followed.
The
wpuf-
prefix is used consistently across various components in the project, as evidenced by the search results.
- assets/js/components/subscriptions/Unsaved.vue
- assets/js/components/subscriptions/UpdateButton.vue
- assets/js/components/subscriptions/Subsection.vue
- assets/js/components/subscriptions/SubscriptionsDetails.vue
- assets/js/components/subscriptions/SidebarMenu.vue
- and many more...
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the class naming convention `wpuf-` is consistently used throughout the project. # Test: Search for class names with the `wpuf-` prefix. Expect: Consistent usage of the prefix. rg --type vue 'class="wpuf-'Length of output: 58
Script:
#!/bin/bash # Description: Verify that the class naming convention `wpuf-` is consistently used throughout the project. # Test: Search for class names with the `wpuf-` prefix within .vue files. Expect: Consistent usage of the prefix. rg 'class="wpuf-' --glob '*.vue'Length of output: 32794
assets/js/components/subscriptions/Popup.vue (2)
1-33
: LGTM!The imports, store initialization, computed properties, and methods are correctly implemented.
35-74
: LGTM!The conditional rendering, click events, dynamic text, and accessibility attributes are correctly implemented.
assets/js/components/subscriptions/List.vue (2)
1-67
: LGTM!The imports, store initialization, refs, methods, and watchers are correctly implemented.
71-105
: LGTM!The conditional rendering, dynamic components, and overall structure are correctly implemented.
assets/js/components/Subscriptions.vue (12)
64-71
: Ensure correct resetting of dirty state and navigation.Verify that the
goToList
function correctly resets the dirty state and navigates to the list component.Verification successful
Let's re-run the script using
fd
to locate Vue files and then search within those files usingrg
.
The
goToList
function is used in multiple contexts, including component bindings and event handlers. These usages suggest that the function is being called appropriately to handle navigation and reset the dirty state.Ensure correct resetting of dirty state and navigation.
The
goToList
function is correctly used in various contexts such as component bindings and event handlers to reset the dirty state and navigate to the list component.
@go-to-list="goToList"
in a component binding.@goToList="goToList"
in anUnsaved
component.$emit('goToList')
in a button click handler.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `goToList` function correctly resets the dirty state and navigates to the list component. # Test: Search for the usage of `goToList`. Expect: The function is called with appropriate arguments and handles navigation correctly. rg --type vue 'goToList'Length of output: 52
Script:
#!/bin/bash # Description: Verify that the `goToList` function correctly resets the dirty state and navigates to the list component. # Find all Vue files and search for the usage of `goToList` fd -e vue -x rg 'goToList' {}Length of output: 691
21-24
: Ensure correct initialization of stores.Verify that all stores are correctly initialized and used within the file.
Verification successful
Initialization of stores is correctly implemented.
All stores (
componentStore
,subscriptionStore
,quickEditStore
,noticeStore
) are correctly initialized and used within theSubscriptions.vue
file.
componentStore
is used for managing the current component state.subscriptionStore
is used for handling subscription-related data and state.quickEditStore
is used for managing quick edit states.noticeStore
is used for handling notices.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all stores are correctly initialized and used within the file. # Test: Search for the usage of each store. Expect: All stores are used within the file. rg --type vue 'componentStore|subscriptionStore|quickEditStore|noticeStore'Length of output: 105
Script:
#!/bin/bash # Description: Verify that all stores are correctly initialized and used within the Subscriptions.vue file. # Locate the Subscriptions.vue file fd --glob 'Subscriptions.vue' --exec rg 'componentStore|subscriptionStore|quickEditStore|noticeStore' {}Length of output: 2123
33-47
: Ensure correct usage of provide and onBeforeMount.Verify that
provide
andonBeforeMount
are correctly used and necessary for the component's functionality.Verification successful
Ensure correct usage of provide and onBeforeMount.
The
provide
andonBeforeMount
functions are correctly used and necessary for the component's functionality, as evidenced by their extensive usage across multiple files.
wpufSubscriptions
is provided and injected in various components, indicating its importance.subscriptionStore.setSubscriptionsByStatus
is called in multiple places, showing its role in managing subscription state.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `provide` and `onBeforeMount` are correctly used and necessary for the component's functionality. # Test: Search for the usage of `wpufSubscriptions` and `subscriptionStore.setSubscriptionsByStatus`. Expect: Both are used within the file. rg --type vue 'wpufSubscriptions|subscriptionStore.setSubscriptionsByStatus'Length of output: 106
Script:
#!/bin/bash # Description: Verify that `provide` and `onBeforeMount` are correctly used and necessary for the component's functionality. # Test: Search for the usage of `wpufSubscriptions` and `subscriptionStore.setSubscriptionsByStatus` within .vue files. rg 'wpufSubscriptions|subscriptionStore.setSubscriptionsByStatus' --glob '*.vue'Length of output: 6262
132-143
: Ensure correct rendering of notice section.Verify that the notice section is correctly rendered based on the notice store state.
Verification successful
Let's adjust the
rg
command to search within.vue
files without specifying a file type.
Ensure correct rendering of notice section.
The notice section in
assets/js/components/Subscriptions.vue
is correctly rendered based on the notice store state.
noticeStore.display
andnotices
are used appropriately within the file to conditionally render the notice section.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the notice section is correctly rendered based on the notice store state. # Test: Search for the usage of `noticeStore.display` and `notices`. Expect: The notice section is rendered correctly. rg --type vue 'noticeStore.display|notices'Length of output: 73
Script:
#!/bin/bash # Description: Verify that the notice section is correctly rendered based on the notice store state. # Test: Search for the usage of `noticeStore.display` and `notices` within .vue files. rg 'noticeStore.display|notices' --glob '*.vue'Length of output: 1556
78-97
: Ensure correct updating of the component based on currentComponent.Verify that the watch function correctly updates the component based on the current component store value.
Verification successful
Ensure correct updating of the component based on currentComponent.
The
watch
function correctly updates the component based on thecurrentComponent
value from thecomponentStore
.
- The only instance of
componentStore.currentComponent
is found within thewatch
function inSubscriptions.vue
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the watch function correctly updates the component based on the current component store value. # Test: Search for the usage of `componentStore.currentComponent`. Expect: The watch function handles updates correctly. rg --type vue 'componentStore.currentComponent'Length of output: 75
Script:
#!/bin/bash # Description: Verify that the watch function correctly updates the component based on the current component store value. # Test: Search for the usage of `componentStore.currentComponent`. Expect: The watch function handles updates correctly. rg 'componentStore.currentComponent' --glob '*.vue'Length of output: 133
101-110
: Ensure correct rendering of header and loading spinner.Verify that the header and loading spinner are correctly rendered based on the component state.
Verification successful
The header and loading spinner are correctly rendered based on the component state.
The conditions for rendering the header and loading spinner are appropriately handled in the codebase.
subscriptionStore.isSubscriptionLoading
andcomponent
are used to control the rendering logic inSubscriptions.vue
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the header and loading spinner are correctly rendered based on the component state. # Test: Search for the usage of `subscriptionStore.isSubscriptionLoading` and `component`. Expect: The header and loading spinner are rendered correctly. rg --type vue 'subscriptionStore.isSubscriptionLoading|component'Length of output: 95
Script:
#!/bin/bash # Description: Verify that the header and loading spinner are correctly rendered based on the component state. # Test: Search for the usage of `subscriptionStore.isSubscriptionLoading` and `component` within .vue files. rg 'subscriptionStore.isSubscriptionLoading|component' --glob '*.vue' -A 5Length of output: 17938
111-131
: Ensure correct rendering of quick edit and main content sections.Verify that the quick edit and main content sections are correctly rendered based on the component state.
Verification successful
Ensure correct rendering of quick edit and main content sections.
The quick edit and main content sections are conditionally rendered based on the states of
quickEditStore.isQuickEdit
andsubscriptionStore.isSubscriptionLoading
. The usage of these states is consistent with the intended functionality.
quickEditStore.isQuickEdit
is used to toggle the quick edit mode.subscriptionStore.isSubscriptionLoading
is used to control the loading state of the subscription.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the quick edit and main content sections are correctly rendered based on the component state. # Test: Search for the usage of `quickEditStore.isQuickEdit` and `subscriptionStore.isSubscriptionLoading`. Expect: The quick edit and main content sections are rendered correctly. rg --type vue 'quickEditStore.isQuickEdit|subscriptionStore.isSubscriptionLoading'Length of output: 112
Script:
#!/bin/bash # Description: Verify that the quick edit and main content sections are correctly rendered based on the component state. # Find all `.vue` files and search for the usage of `quickEditStore.isQuickEdit` and `subscriptionStore.isSubscriptionLoading`. fd -e vue -x rg 'quickEditStore.isQuickEdit|subscriptionStore.isSubscriptionLoading' {}Length of output: 1064
2-3
: Ensure all imports are necessary and used.Verify that all imported modules from
vue
andpinia
are used within the file to avoid unnecessary imports.Verification successful
All imported modules are necessary and used.
The imported modules
provide
,onBeforeMount
,ref
,watch
fromvue
andstoreToRefs
frompinia
are all utilized within the file.
provide
is used to provide values to child components.onBeforeMount
is used to execute code before the component is mounted.ref
is used to create reactive references.watch
is used to watch for changes in reactive data.storeToRefs
is used to convert a store's state to refs.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all imported modules from `vue` and `pinia` are used within the file. # Test: Search for the usage of each imported module. Expect: All modules are used within the file. rg --type vue 'provide|onBeforeMount|ref|watch|storeToRefs'Length of output: 89
Script:
#!/bin/bash # Description: Verify that all imported modules from `vue` and `pinia` are used within the file. # Find all .vue files and search for the usage of each imported module within those files. fd --type f --extension vue --exec rg 'provide|onBeforeMount|ref|watch|storeToRefs' {}Length of output: 3177
73-76
: Ensure correct removal of notices.Verify that the
removeNotice
function correctly removes notices from the notice store.Verification successful
The
removeNotice
function is correctly implemented and used.The function properly removes a notice from the
noticeStore
and is correctly utilized in the template to handle and emit theremoveNotice
event.
- The function is defined to remove a notice from the
noticeStore
.- It is used in a
v-for
loop to iterate over notices.- The
removeNotice
event is emitted when a button is clicked.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `removeNotice` function correctly removes notices from the notice store. # Test: Search for the usage of `removeNotice`. Expect: The function is called with appropriate arguments and handles removal correctly. rg --type vue 'removeNotice'Length of output: 56
Script:
#!/bin/bash # Description: Verify that the `removeNotice` function correctly removes notices from the notice store. # Locate all .vue files and search for the usage of `removeNotice` within those files. fd --extension vue --exec rg 'removeNotice' {}Length of output: 221
Script:
#!/bin/bash # Description: Gather more context around the usage of `removeNotice` within the .vue files to verify its correct implementation and usage. # Locate all .vue files and search for the usage of `removeNotice` within those files, including surrounding lines for context. fd --extension vue --exec rg -A 5 -B 5 'removeNotice' {}Length of output: 1558
4-19
: Ensure all component imports are necessary and used.Verify that all imported components are used within the template to avoid unnecessary imports.
Verification successful
All imported components are necessary and used within the
Subscriptions.vue
template.The components
Header
andHollowDotsSpinner
are confirmed to be used in the template, along with the other components.
Header
is used at line 4.HollowDotsSpinner
is used at line 6.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all imported components are used within the template. # Test: Search for the usage of each imported component. Expect: All components are used within the template. rg --type vue 'Header|SidebarMenu|List|Empty|Edit|New|QuickEdit|Notice|Unsaved'Length of output: 109
Script:
#!/bin/bash # Description: Verify that all imported components are used within the template. # Test: Search for the usage of each imported component within .vue files. Expect: All components are used within the template. rg 'Header|SidebarMenu|List|Empty|Edit|New|QuickEdit|Notice|Unsaved' --glob '*.vue' -A 5Length of output: 30631
Script:
#!/bin/bash # Description: Verify the usage of `Header` and `HollowDotsSpinner` components within Subscriptions.vue. # Test: Search for the usage of `Header` and `HollowDotsSpinner` in Subscriptions.vue. Expect: Both components are used within the file. rg 'Header|HollowDotsSpinner' assets/js/components/Subscriptions.vue -A 5Length of output: 683
49-61
: Ensure correct handling of dirty state and subscription status.Verify that the
checkIsDirty
function correctly handles the dirty state and subscription status transitions.Verification successful
Let's correct the previous script to search for the
checkIsDirty
function usage in.vue
files by specifying the correct file type.
Ensure correct handling of dirty state and subscription status.
The
checkIsDirty
function is correctly defined and invoked in the codebase. It handles the dirty state and subscription status transitions as expected.
Definition and Usage in
assets/js/components/Subscriptions.vue
const checkIsDirty = ( subscriptionStatus = 'all' ) => { if (subscriptionStore.isDirty) { subscriptionStore.isUnsavedPopupOpen = true; tempSubscriptionStatus.value = subscriptionStatus; } else { subscriptionStore.isDirty = false; subscriptionStore.isUnsavedPopupOpen = false; subscriptionStore.setSubscriptionsByStatus( subscriptionStatus ); componentStore.setCurrentComponent( 'List' ); subscriptionStore.setCurrentSubscription(null); subscriptionStore.getSubscriptionCount(); } }Event Handling in
assets/js/components/subscriptions/SidebarMenu.vue
@click="$emit('checkIsDirty', 'all')" @click="$emit('checkIsDirty', 'publish')" @click="$emit('checkIsDirty', 'draft')" @click="$emit('checkIsDirty', 'trash')"The
checkIsDirty
function is invoked with different subscription statuses, ensuring that the dirty state and subscription status transitions are handled correctly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `checkIsDirty` function correctly handles the dirty state and subscription status transitions. # Test: Search for the usage of `checkIsDirty`. Expect: The function is called with appropriate arguments and handles transitions correctly. rg --type vue 'checkIsDirty'Length of output: 56
Script:
#!/bin/bash # Description: Verify that the `checkIsDirty` function correctly handles the dirty state and subscription status transitions. # Test: Search for the usage of `checkIsDirty`. Expect: The function is called with appropriate arguments and handles transitions correctly. rg 'checkIsDirty' --glob '*.vue' -A 5Length of output: 4516
25-31
: Ensure correct initialization of refs.Verify that all refs are correctly initialized and used within the file.
Verification successful
All refs are correctly initialized and used within the file.
The refs
component
,tempSubscriptionStatus
,componentKey
, andnoticeKey
are all properly initialized and utilized within theSubscriptions.vue
file.
component
is used in thewatch
function and within the template.tempSubscriptionStatus
is used in multiple places to set and get subscription status.componentKey
andnoticeKey
are used in the template to manage component and notice keys.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all refs are correctly initialized and used within the file. # Test: Search for the usage of each ref. Expect: All refs are used within the file. rg --type vue 'component|tempSubscriptionStatus|componentKey|noticeKey'Length of output: 101
Script:
#!/bin/bash # Description: Verify that all refs are correctly initialized and used within the file. # Test: Search for the usage of each ref. Expect: All refs are used within the file. rg 'component|tempSubscriptionStatus|componentKey|noticeKey' --glob '*.vue' -A 5Length of output: 15717
assets/js/components/subscriptions/Pagination.vue (6)
2-3
: Ensure all imports are necessary and used.Verify that all imported modules from
vue
and the subscription store are used within the file to avoid unnecessary imports.Verification successful
All imports are necessary and used.
The imports
computed
,ref
,watch
from 'vue', anduseSubscriptionStore
from the subscription store are all utilized within thePagination.vue
file.
computed
is used multiple times for computed properties.ref
is used to create reactive references.watch
is used to watch changes in the subscription status.useSubscriptionStore
is used to access the subscription store.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all imported modules from `vue` and the subscription store are used within the file. # Test: Search for the usage of each imported module. Expect: All modules are used within the file. rg --type vue 'computed|ref|watch|useSubscriptionStore'Length of output: 85
Script:
#!/bin/bash # Description: Verify that all imported modules from `vue` and the subscription store are used within the file. # Test: Search for the usage of each imported module within the specific file. rg 'computed|ref|watch|useSubscriptionStore' assets/js/components/subscriptions/Pagination.vueLength of output: 788
75-85
: Ensure correct definition and usage of navigation functions.Verify that the
goToFirstPage
andgoToLastPage
functions are correctly defined and used within the file.Verification successful
The
goToFirstPage
andgoToLastPage
functions are correctly defined and used within the file.
- The functions are defined as expected.
- They are used in
@click
events within the file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `goToFirstPage` and `goToLastPage` functions are correctly defined and used within the file. # Test: Search for the usage of `goToFirstPage` and `goToLastPage`. Expect: Both functions are used within the file. rg --type vue 'goToFirstPage|goToLastPage'Length of output: 72
Script:
#!/bin/bash # Description: Verify that the `goToFirstPage` and `goToLastPage` functions are correctly defined and used within the file. # Find all .vue files and search for the usage of `goToFirstPage` and `goToLastPage` functions within them. fd -e vue -x rg 'goToFirstPage|goToLastPage' {}Length of output: 203
7-30
: Ensure correct definition and usage of props and emits.Verify that all props and emits are correctly defined and used within the file.
Verification successful
The props and emits are correctly defined and used within the file.
- All props (
currentPage
,count
,maxVisibleButtons
,totalPages
,perPage
) are utilized.- The emit (
changePageTo
) is also correctly used.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all props and emits are correctly defined and used within the file. # Test: Search for the usage of each prop and emit. Expect: All props and emits are used within the file. rg --type vue 'currentPage|count|maxVisibleButtons|totalPages|perPage|changePageTo'Length of output: 113
Script:
#!/bin/bash # Description: Verify that all props and emits are correctly defined and used within the file. # Locate all .vue files and search for the usage of each prop and emit. fd -e vue -x rg 'currentPage|count|maxVisibleButtons|totalPages|perPage|changePageTo' {}Length of output: 2879
37-73
: Ensure correct definition and usage of computed properties.Verify that all computed properties are correctly defined and used within the file.
Verification successful
All computed properties are correctly defined and used within the file.
isInFirstPage
isInLastPage
startPage
startNumber
endNumber
pages
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all computed properties are correctly defined and used within the file. # Test: Search for the usage of each computed property. Expect: All computed properties are used within the file. rg --type vue 'isInFirstPage|isInLastPage|startPage|startNumber|endNumber|pages'Length of output: 110
Script:
#!/bin/bash # Description: Locate the Pagination.vue file and search for the usage of each computed property within it. # Locate the Pagination.vue file pagination_file=$(fd Pagination.vue) # Search for the usage of each computed property within the located file rg 'isInFirstPage|isInLastPage|startPage|startNumber|endNumber|pages' "$pagination_file"Length of output: 1188
94-137
: Ensure correct rendering of pagination controls.Verify that the pagination controls are correctly rendered based on the component state.
Verification successful
Ensure correct rendering of pagination controls.
The pagination controls are correctly rendered based on the component state, as evidenced by the usage of
currentPage
,pages
,goToFirstPage
, andgoToLastPage
in thePagination.vue
file.
currentPage
is defined and used to manage the current page state.pages
is computed to determine the range of pages to display.goToFirstPage
andgoToLastPage
functions are implemented to navigate to the first and last pages, respectively.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the pagination controls are correctly rendered based on the component state. # Test: Search for the usage of `currentPage`, `pages`, `goToFirstPage`, and `goToLastPage`. Expect: The pagination controls are rendered correctly. rg --type vue 'currentPage|pages|goToFirstPage|goToLastPage'Length of output: 90
Script:
#!/bin/bash # Description: Verify that the pagination controls are correctly rendered based on the component state. # Test: Search for the usage of `currentPage`, `pages`, `goToFirstPage`, and `goToLastPage` within .vue files. rg 'currentPage|pages|goToFirstPage|goToLastPage' --glob '*.vue' -A 5Length of output: 9401
87-90
: Ensure correct updating of count and total pages based on subscription status.Verify that the watch function correctly updates the count and total pages based on the subscription status.
Verification successful
The watch function correctly updates the count and total pages based on the subscription status.
The usage of
subscriptionStore.currentSubscriptionStatus
in the codebase, including thewatch
function, confirms that the implementation is consistent and correct.
- The
watch
function updatescount
andtotalPages
based on the subscription status.- Other usages of
subscriptionStore.currentSubscriptionStatus
indicate proper management of subscription states.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the watch function correctly updates the count and total pages based on the subscription status. # Test: Search for the usage of `subscriptionStore.currentSubscriptionStatus`. Expect: The watch function handles updates correctly. rg --type vue 'subscriptionStore.currentSubscriptionStatus'Length of output: 87
Script:
#!/bin/bash # Description: Verify that the watch function correctly updates the count and total pages based on the subscription status. # Find all .vue files and search for the usage of `subscriptionStore.currentSubscriptionStatus` fd -e vue -x rg 'subscriptionStore.currentSubscriptionStatus' {}Length of output: 2350
includes/Admin/List_Table_Subscribers.php (1)
16-16
: Ensure correct preparation of items with pagination and filtering.Verify that the
prepare_items
method correctly prepares items for the list table with pagination and filtering.
[Also applies to: 62-62
assets/js/components/subscriptions/InfoCard.vue (2)
6-7
: Ensure Proper Error Handling for Store Usage.Ensure that
subscriptionStore
andcurrentSubscription
are correctly initialized and handle any potential errors that might occur during their usage.
29-70
: Ensure Accessibility and Consistency in Template.Ensure that all elements have appropriate accessibility attributes and consistent styling.
assets/js/components/subscriptions/QuickEdit.vue (5)
13-14
: Ensure Proper Error Handling for Store Usage.Ensure that
subscriptionStore
andnoticeStore
are correctly initialized and handle any potential errors that might occur during their usage.
19-19
: Use Consistent Date Initialization.Consider using a consistent method for date initialization to avoid potential issues with different date formats.
39-41
: Ensure Proper Date Handling.Ensure that the date handling logic correctly updates the
currentSubscription.post_date
without introducing any timezone issues.
78-110
: Ensure Proper Scoping and Best Practices in CSS.Ensure that the styles are scoped properly and follow best practices for maintainability and readability.
111-165
: Ensure Accessibility and Consistency in Template.Ensure that all elements have appropriate accessibility attributes and consistent styling.
assets/js/components/ProTooltip.vue (1)
3-54
: Ensure Accessibility and Consistency in Template.Ensure that all elements have appropriate accessibility attributes and consistent styling.
Gruntfile.js (4)
61-61
: LGTM! Exclude unnecessary files from POT generation.Excluding
build/.*
andnode_modules/*
from the POT file generation is a good practice for localization.
105-114
: LGTM! Integrate Vue.js components dynamically.Adding the
vue
task underwatch
to monitor changes in Vue-related files and trigger theshell:npm_build
task improves the development workflow.
221-225
: LGTM! Streamline execution of NPM scripts.Defining the
shell
task to encapsulate thenpm_build
command enhances the build capabilities by including NPM tasks directly from Grunt.
240-240
: LGTM! Load thegrunt-shell
task.Loading the
grunt-shell
task is necessary for theshell
task to function correctly.assets/js/subscriptions-old.js (4)
53-55
: LGTM! Display alert with subscription pack notice.The
packAlert
function correctly displays an alert with a message fromwpuf_subscription.pack_notice
.
260-274
: LGTM! Toggle visibility of subscription pack status.The
showSubscriptionPack
function correctly toggles the visibility of the subscription pack status.
226-258
: Simplify theshowSubscriptionRecurring
function.The function can be simplified by using a single condition to toggle the elements.
if ( self.is(':checked') ) { if ( trial_checkbox.is(':checked') ) { trial_child.show(); } pack_child.show(); expire_field.hide(); } else { trial_child.hide(); pack_child.hide(); expire_field.show(); }Likely invalid or redundant comment.
278-288
: Optimize thesetTimeExpiration
function.The function can be optimized by using a loop to generate the options.
$('#wpuf-expiration_time_value').html(''); var timeVal = e.target ? $(e.target).val() : $(e).val(); for (var time = 1; time <= timeArray[timeVal]; time++) { $('#wpuf-expiration_time_value').append('<option>' + time + '</option>'); }Likely invalid or redundant comment.
includes/Admin/Forms/Admin_Form_Builder.php (2)
45-45
: LGTM! Simplify the class by delegating admin notice removal.Replacing the method call to
remove_admin_notices
with a direct function reference towpuf_remove_admin_notices
simplifies the class and improves code maintainability.
Line range hint
1-1
:
LGTM! Remove redundant method.Removing the
remove_admin_notices
method eliminates redundancy and simplifies the class.includes/Admin/Menu.php (3)
170-176
: LGTM!The new
subscription_menu_action
method adds a hook for additional processing when the "Subscriptions" page is accessed. This improves modularity and allows for custom actions.
185-189
: LGTM!The new
subscription_menu_page
method includes the content from a specified PHP file for the "Subscriptions" page. This is a standard practice for rendering page content in WordPress.
44-56
: LGTM! But verify the function usage in the codebase.The changes to add the "Subscriptions" submenu and the corresponding action hook are approved.
However, ensure that all function calls to
subscription_menu_page
andsubscription_menu_action
are correctly implemented and used.Verification successful
Function usage verified successfully.
The functions
subscription_menu_page
andsubscription_menu_action
are correctly implemented and used within theincludes/Admin/Menu.php
file.
subscription_menu_page
includes the subscriptions view.subscription_menu_action
triggers the custom action hookwpuf_load_subscription_page
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `subscription_menu_page` and `subscription_menu_action` match the new implementation. # Test: Search for the function usage. Expect: Only occurrences of the new implementation. rg --type php -A 5 $'subscription_menu_page' rg --type php -A 5 $'subscription_menu_action'Length of output: 1746
assets/js/stores/subscription.js (8)
7-24
: LGTM!The state properties are well-defined and cover various aspects of subscription management using
ref
andreactive
.
68-102
: LGTM!The actions for setting and modifying the current subscription are well-defined and cover the necessary functionalities.
Tools
Biome
[error] 89-89: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.The declaration is defined in this switch clause:
Unsafe fix: Wrap the declaration in a block.
(lint/correctness/noSwitchDeclarations)
[error] 90-90: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
119-164
: LGTM!The actions for updating subscriptions are well-defined and cover the necessary functionalities.
216-233
: LGTM!The actions for handling errors and validating fields are well-defined and cover the necessary functionalities.
291-304
: LGTM!The actions for validating fields and checking for errors are well-defined and cover the necessary functionalities.
305-319
: LGTM!The actions for deleting and changing subscription status are well-defined and cover the necessary functionalities.
320-376
: LGTM!The actions for fetching subscriptions by status and getting subscription counts are well-defined and cover the necessary functionalities.
103-118
: UseObject.hasOwn()
instead ofObject.prototype.hasOwnProperty
.The logic for getting values from fields is correct, but it's recommended to use
Object.hasOwn()
for better readability and performance.- if (this.currentSubscription.hasOwnProperty( key )) { + if (Object.hasOwn(this.currentSubscription, key)) {Likely invalid or redundant comment.
assets/js/components/subscriptions/SectionInputField.vue (2)
50-105
: LGTM!The methods for handling input fields and modifying subscriptions are well-defined and cover the necessary functionalities.
193-329
: LGTM!The template for the input fields in the subscription section is well-defined and follows best practices for Vue components.
assets/js/components/subscriptions/SubscriptionBox.vue (5)
112-117
: Ensure correct implementation of lifecycle hooks and subscriptions.Review the implementation of lifecycle hooks and subscriptions to ensure correctness and proper usage.
Also applies to: 230-235
Verification successful
Lifecycle hooks and subscriptions are correctly implemented.
The
onBeforeMount
lifecycle hook andquickEditStore.$subscribe
method are appropriately used in theSubscriptionBox.vue
file. The methodssetPillBackground
,setBillingAmount
, andgetSubscribers
are correctly defined within the same file, andquickEditStore
is properly imported from thequickEdit
store.
- File:
assets/js/components/subscriptions/SubscriptionBox.vue
- Lines: 112-117
- Lines: 230-235
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of lifecycle hooks and subscriptions. # Test: Search for the usage of lifecycle hooks and subscriptions. Expect: Each should be correctly used in the file. rg --type vue -A 5 $'onBeforeMount' && \ rg --type vue -A 5 $'quickEditStore.$subscribe'Length of output: 62
Script:
#!/bin/bash # Description: Verify the implementation of lifecycle hooks and subscriptions. # Test: Search for the usage of lifecycle hooks and subscriptions. Expect: Each should be correctly used in the file. rg -A 5 'onBeforeMount' && \ rg -A 5 'quickEditStore.\$subscribe'Length of output: 10809
Script:
#!/bin/bash # Description: Verify the definitions and imports of methods and store in SubscriptionBox.vue. # Test: Search for the definitions and imports of the methods and store used in SubscriptionBox.vue. rg 'setPillBackground|setBillingAmount|getSubscribers|useQuickEditStore' assets/js/components/subscriptions/SubscriptionBox.vueLength of output: 429
14-30
: Ensure correct initialization and usage of props, refs, and stores.Review the initialization and usage of props, reactive references, and stores to ensure correctness.
Verification successful
Initialization and usage of props, refs, and stores are correctly defined and present in the file.
- The
props
are properly defined and destructured.- The
refs
are correctly initialized.- The
stores
are properly used.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the initialization and usage of props, refs, and stores. # Test: Search for the usage of each prop, ref, and store. Expect: Each should be correctly used in the file. rg --type vue -A 5 $'const props = defineProps' && \ rg --type vue -A 5 $'const emit = defineEmits' && \ rg --type vue -A 5 $'const showPopup = ref' && \ rg --type vue -A 5 $'const showBox = ref' && \ rg --type vue -A 5 $'const pillColor = ref' && \ rg --type vue -A 5 $'const quickMenuStatus = ref' && \ rg --type vue -A 5 $'const billingAmount = ref' && \ rg --type vue -A 5 $'const subscribers = ref' && \ rg --type vue -A 5 $'const componentStore = useComponentStore' && \ rg --type vue -A 5 $'const quickEditStore = useQuickEditStore' && \ rg --type vue -A 5 $'const subscriptionStore = useSubscriptionStore' && \ rg --type vue -A 5 $'const noticeStore = useNoticeStore'Length of output: 76
Script:
#!/bin/bash # Description: Verify the initialization and usage of props, refs, and stores in the specific Vue file. # Test: Search for the usage of each prop, ref, and store within the file. rg 'const props = defineProps' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const emit = defineEmits' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const showPopup = ref' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const showBox = ref' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const pillColor = ref' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const quickMenuStatus = ref' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const billingAmount = ref' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const subscribers = ref' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const componentStore = useComponentStore' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const quickEditStore = useQuickEditStore' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const subscriptionStore = useSubscriptionStore' assets/js/components/subscriptions/SubscriptionBox.vue -A 5 && \ rg 'const noticeStore = useNoticeStore' assets/js/components/subscriptions/SubscriptionBox.vue -A 5Length of output: 4213
238-324
: Ensure correct implementation of template section.Review the template section to ensure correct bindings to reactive properties and methods, and check for potential rendering and interaction issues.
Verification successful
The template section in
SubscriptionBox.vue
correctly binds to the reactive properties and methods.The properties and methods such as
showBox
,subscription
,title
,isPasswordProtected
,billingAmount
,quickMenuStatus
,showQuickMenu
,hideQuickMenu
,toggleSubscriptionStatus
,restoreSubscription
,postStatus
,isRecurring
,subscribersLink
,subscribers
,showPopup
,trashSubscription
, anddeleteSubscription
are correctly used in the template section.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of the template section. # Test: Search for the usage of reactive properties and methods in the template section. Expect: Each should be correctly used in the template. rg --type vue -A 5 $'<template>'Length of output: 61
Script:
#!/bin/bash # Description: Verify the implementation of the template section. # Find all Vue files and then search for the usage of reactive properties and methods in the template section. fd --type f --extension vue --exec rg '<template>' {}Length of output: 299
Script:
#!/bin/bash # Description: Verify the implementation of the template section in SubscriptionBox.vue. # Find the SubscriptionBox.vue file and search for the usage of reactive properties and methods in the template section. fd --type f --name SubscriptionBox.vue --exec rg 'showBox|subscription|title|isPasswordProtected|billingAmount|quickMenuStatus|showQuickMenu|hideQuickMenu|toggleSubscriptionStatus|restoreSubscription|postStatus|isRecurring|subscribersLink|subscribers|showPopup|trashSubscription|deleteSubscription' {}Length of output: 556
Script:
#!/bin/bash # Description: Verify the implementation of the template section in SubscriptionBox.vue. # Find the SubscriptionBox.vue file and search for the usage of reactive properties and methods in the template section. fd SubscriptionBox.vue --exec rg 'showBox|subscription|title|isPasswordProtected|billingAmount|quickMenuStatus|showQuickMenu|hideQuickMenu|toggleSubscriptionStatus|restoreSubscription|postStatus|isRecurring|subscribersLink|subscribers|showPopup|trashSubscription|deleteSubscription' {}Length of output: 6336
32-224
: Ensure correct implementation of methods and computed properties.Review the implementation of methods and computed properties to ensure correctness, performance, and proper error handling.
2-13
: Ensure all imports are necessary.Review and confirm that all imported modules are necessary for the functionality.
includes/Admin/List_Table_Transactions.php (1)
12-12
: Ensure correct usage of#[AllowDynamicProperties]
attribute.Review the usage of the
#[AllowDynamicProperties]
attribute to ensure it does not introduce any issues.Verification successful
The
#[AllowDynamicProperties]
attribute is correctly used.The
List_Table_Transactions
class contains dynamic properties that are not explicitly defined within the class, justifying the use of the#[AllowDynamicProperties]
attribute.
- Properties like
_column_headers
anditems
are dynamically added within the class.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `#[AllowDynamicProperties]` attribute. # Test: Search for the usage of dynamic properties in the `List_Table_Transactions` class. Expect: Dynamic properties should be correctly used in the class. rg --type php -A 5 $'class List_Table_Transactions extends WP_List_Table'Length of output: 487
Script:
#!/bin/bash # Description: Verify the usage of dynamic properties in the List_Table_Transactions class. # Test: Search for any dynamic property usage in the List_Table_Transactions class. rg --type php '$this->' includes/Admin/List_Table_Transactions.phpLength of output: 68
Script:
#!/bin/bash # Description: Verify the usage of dynamic properties in the List_Table_Transactions class. # Test: Search for any property assignments or usages that might indicate dynamic properties in the List_Table_Transactions class. rg --type php '\$this->' includes/Admin/List_Table_Transactions.phpLength of output: 583
Script:
#!/bin/bash # Description: Verify the definitions of properties used in the List_Table_Transactions class. # Test: Search for the definitions of properties used in the List_Table_Transactions class. rg --type php 'function|var|public|protected|private' includes/Admin/List_Table_Transactions.phpLength of output: 544
includes/Api/Subscription.php (5)
3-10
: Ensure correct namespace and imports.Review the namespace and imports to ensure they are correctly defined and used.
Verification successful
All imported classes are correctly used within the
includes/Api/Subscription.php
file.
WP_REST_Controller
is used in the class declaration.WP_REST_Request
is used multiple times as a parameter type.WP_REST_Response
is used multiple times as a return type and in return statements.Exception
is used in a catch block.WP_REST_Server
is used to define methods.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the namespace and imports. # Test: Search for the usage of each imported class. Expect: Each class should be used in the file. rg --type php -A 5 $'use WP_REST_Controller' && \ rg --type php -A 5 $'use WP_REST_Request' && \ rg --type php -A 5 $'use WP_REST_Response' && \ rg --type php -A 5 $'use Exception' && \ rg --type php -A 5 $'use WP_REST_Server'Length of output: 2024
Script:
#!/bin/bash # Description: Verify the usage of each imported class within the file. # Test: Search for the usage of each imported class. Expect: Each class should be used in the file. rg --type php 'WP_REST_Controller' includes/Api/Subscription.php && \ rg --type php 'WP_REST_Request' includes/Api/Subscription.php && \ rg --type php 'WP_REST_Response' includes/Api/Subscription.php && \ rg --type php 'Exception' includes/Api/Subscription.php && \ rg --type php 'WP_REST_Server' includes/Api/Subscription.phpLength of output: 2291
352-533
: Ensure correct implementation of methods for creating or updating items and permission check.Review the implementation of methods for creating or updating items and checking permissions to ensure correctness, performance, and proper error handling.
Verification successful
Ensure correct usage and implementation of
create_or_update_item
andpermission_check
methods.Review the implementation and usage of the
create_or_update_item
andpermission_check
methods in the codebase to ensure correctness, proper error handling, and expected functionality.
The
create_or_update_item
andpermission_check
methods are correctly implemented and used.
- The
create_or_update_item
method is properly defined and invoked within theincludes/Api/Subscription.php
file.- The
permission_check
method is used multiple times as a permission callback, ensuring proper permission validation.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of methods for creating or updating items and checking permissions. # Test: Search for the usage of each method for creating or updating items and checking permissions. Expect: Each should be correctly used in the file. rg --type php -A 5 $'public function create_or_update_item' && \ rg --type php -A 5 $'public function permission_check'Length of output: 768
Script:
#!/bin/bash # Description: Verify the usage of `create_or_update_item` and `permission_check` methods in the codebase. # Test: Search for the usage of `create_or_update_item` method. rg --type php 'create_or_update_item' # Test: Search for the usage of `permission_check` method. rg --type php 'permission_check'Length of output: 1167
11-100
: Ensure correct definition and usage of class properties and constructor.Review the class properties and constructor to ensure they are correctly defined and used, and routes are correctly registered.
102-231
: Ensure correct implementation of methods for handling subscriptions.Review the implementation of methods for handling subscriptions to ensure correctness, performance, and proper error handling.
Verification successful
Verified: The methods for handling subscriptions are correctly implemented and used.
The methods
total_subscriptions_count
,total_subscriptions_count_by_status
,delete_item
, andget_subscribers_count
inincludes/Api/Subscription.php
are correctly defined and used. The methodstotal_subscriptions_count_by_status
andtotal_subscriptions_count_array
inincludes/Admin/Subscription.php
are correctly implemented and used.
total_subscriptions_count
andtotal_subscriptions_count_by_status
correctly interact with the Admin class methods.- Proper error handling and response formatting are in place.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of methods for handling subscriptions. # Test: Search for the usage of each method for handling subscriptions. Expect: Each should be correctly used in the file. rg --type php -A 5 $'public function total_subscriptions_count' && \ rg --type php -A 5 $'public function total_subscriptions_count_by_status' && \ rg --type php -A 5 $'public function delete_item' && \ rg --type php -A 5 $'public function get_subscribers_count'Length of output: 3804
Script:
#!/bin/bash # Description: Verify the implementation of methods in the Admin class for handling subscriptions. # Test: Search for the implementation and usage of methods in the Admin class. rg --type php -A 5 $'public function total_subscriptions_count_by_status' && \ rg --type php -A 5 $'public function total_subscriptions_count_array'Length of output: 1433
Script:
#!/bin/bash # Description: Verify the usage of methods in the Admin class for handling subscriptions. # Test: Search for the usage of methods in the Admin class. rg --type php -A 5 $'total_subscriptions_count_by_status' && \ rg --type php -A 5 $'total_subscriptions_count_array'Length of output: 2377
233-350
: Ensure correct implementation of methods for getting and editing items.Review the implementation of methods for getting and editing items to ensure correctness, performance, and proper error handling.
Verification successful
The methods
get_items
andedit_item
are correctly implemented and registered as REST API callbacks.
get_items
is registered for the READABLE method.edit_item
is registered for the EDITABLE method.Both methods are properly integrated into the REST API with appropriate permission checks.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of methods for getting and editing items. # Test: Search for the usage of each method for getting and editing items. Expect: Each should be correctly used in the file. rg --type php -A 5 $'public function get_items' && \ rg --type php -A 5 $'public function edit_item'Length of output: 1142
Script:
#!/bin/bash # Description: Search for references to the get_items and edit_item methods in the codebase. # Search for references to the get_items method. rg --type php 'get_items' # Search for references to the edit_item method. rg --type php 'edit_item'Length of output: 989
Script:
#!/bin/bash # Description: Verify the registration of get_items and edit_item methods as REST API callbacks. # Search for REST API registration in the includes/Api/Subscription.php file. rg --type php 'register_rest_route' includes/Api/Subscription.php # Search for the class definition to understand the context of these methods. rg --type php 'class' includes/Api/Subscription.phpLength of output: 310
Script:
#!/bin/bash # Description: Display the lines around the register_rest_route calls to understand the registration of methods. # Display lines around the register_rest_route calls in the includes/Api/Subscription.php file. rg --type php 'register_rest_route' -A 10 -B 2 includes/Api/Subscription.phpLength of output: 2369
includes/Admin/Subscription.php (4)
1417-1430
: LGTM!The new method correctly implements the counting logic for subscriptions filtered by their status.
1439-1465
: LGTM!The new method correctly aggregates counts of subscriptions by their status into an array, excluding 'auto-draft' and handling 'trash' appropriately.
283-310
: LGTM! But verify the usage of new keys in the codebase.The changes maintain backward compatibility by adding new keys prefixed with an underscore. Ensure that these new keys are correctly used throughout the codebase.
Verification successful
LGTM! But verify the usage of new keys in the codebase.
The changes maintain backward compatibility by adding new keys prefixed with an underscore. The new keys are correctly used throughout the codebase in various files.
class/subscription.php
includes/Api/Subscription.php
includes/upgrades/upgrade-4.0.8.php
includes/User_Subscription.php
includes/Free/Form_Element.php
includes/Ajax/Frontend_Form_Ajax.php
includes/Admin/Subscription.php
includes/Admin/Admin_Subscription.php
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of new keys prefixed with an underscore in the codebase. # Test: Search for the usage of new keys. Expect: Occurrences of the new keys. rg --type php '_billing_amount|_expiration_number|_expiration_period|_recurring_pay|_billing_cycle_number|_cycle_period|_billing_limit|_trial_status|_trial_duration|_trial_duration_type|_post_type_name|_enable_post_expiration|_post_expiration_time|_post_expiration_number|_post_expiration_period|_expired_post_status|_enable_mail_after_expired|_post_expiration_message|_total_feature_item|_remove_feature_item'Length of output: 28016
455-457
: LGTM! But verify the impact of visibility and REST API access.The changes make the
wpuf_subscription
post type public and accessible via the REST API. Ensure that these changes do not introduce any unintended side effects.includes/Admin/Admin_Subscription.php (19)
17-19
: Approved: Addition of filter hook for third-party CPT optionsThe
wpuf_subscription_additional_fields
filter hook allows third-party custom post type options to be added, enhancing extensibility.
38-41
: Approved: Addition of action hooks for subscription page enhancementsThe
wpuf_load_subscription_page
actions manage admin notices, load necessary scripts, and modify the admin footer text, enhancing the subscription page's functionality.
43-85
: Approved: Addition ofthird_party_cpt_options
methodThe
third_party_cpt_options
method processes available post types and allows configuration of limits on the number of items users can create within their subscription periods. The method is well-structured and follows best practices.
87-121
: Approved: Addition ofenqueue_admin_scripts
methodThe
enqueue_admin_scripts
method enqueues necessary JavaScript and CSS files for the subscription management interface and localizes script data. The method is well-structured and follows best practices.
123-131
: Approved: Addition ofremove_notices
methodThe
remove_notices
method removes admin notices from the subscription page. The method is straightforward and follows best practices.
225-225
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
266-266
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
322-322
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
334-334
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
399-399
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
408-408
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
481-481
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
661-661
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
704-704
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
741-741
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
782-782
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
906-906
: Approved: Standardization of recurring subscription checksThe use of
wpuf_is_option_on
standardizes the logic for evaluating subscription states, enhancing clarity and reliability.
1006-1547
: Approved: Addition of methods for structured subscription settingsThe methods
get_sections
,get_sub_sections
,get_fields
, andget_dependent_fields
organize the subscription settings more effectively, providing structured access to different aspects of subscription management. The methods are well-structured and follow best practices.
1550-1577
: Approved: Addition of methods for modifying admin footer textThe methods
modify_admin_footer_text
andadmin_footer_text
modify the admin footer text to provide a custom message. The methods are straightforward and follow best practices.assets/css/admin/subscriptions.min.css (4)
1-1
: Ensure proper source mapping for debugging.If not already done, ensure that source maps are provided for this minified CSS file to aid in debugging.
1-1
: Verify the consistency of CSS variable usage.The file uses CSS variables (e.g.,
--ms-bg
,--dp-border-color
). Ensure these variables are consistently defined and used across the project.
1-1
: Check for any potential performance issues.Minified CSS can sometimes hide performance issues, such as excessive use of animations or complex selectors. Verify that the styles do not negatively impact performance.
1-1
: Review accessibility considerations.Ensure that the styles applied do not hinder accessibility, such as maintaining sufficient contrast ratios, focus states, and readability.
@@ -0,0 +1 @@ | |||
.hollow-dots-spinner,.hollow-dots-spinner *{box-sizing:border-box}.hollow-dots-spinner{height:15px;width:90px}.hollow-dots-spinner .dot{width:15px;height:15px;margin:0 7.5px;border:3px solid #ff1d5e;border-radius:50%;float:left;transform:scale(0);animation:hollow-dots-spinner-animation 1s ease infinite 0ms}.hollow-dots-spinner .dot:nth-child(1){animation-delay:.3s}.hollow-dots-spinner .dot:nth-child(2){animation-delay:.6s}.hollow-dots-spinner .dot:nth-child(3){animation-delay:calc(.3s * 3)}@keyframes hollow-dots-spinner-animation{50%{transform:scale(1);opacity:1}to{opacity:0}}.multiselect{align-items:center;background:var(--ms-bg,#fff);border:var(--ms-border-width,1px) solid var(--ms-border-color,#d1d5db);border-radius:var(--ms-radius,4px);box-sizing:border-box;cursor:pointer;display:flex;font-size:var(--ms-font-size,1rem);justify-content:flex-end;margin:0 auto;min-height:calc(var(--ms-border-width, 1px)*2 + var(--ms-font-size, 1rem)*var(--ms-line-height, 1.375) + var(--ms-py, .5rem)*2);outline:none;position:relative;width:100%}.multiselect.is-open{border-radius:var(--ms-radius,4px) var(--ms-radius,4px) 0 0}.multiselect.is-open-top{border-radius:0 0 var(--ms-radius,4px) var(--ms-radius,4px)}.multiselect.is-disabled{background:var(--ms-bg-disabled,#f3f4f6);cursor:default}.multiselect.is-active{border:var(--ms-border-width-active,var(--ms-border-width,1px)) solid var(--ms-border-color-active,var(--ms-border-color,#d1d5db));box-shadow:0 0 0 var(--ms-ring-width,3px) var(--ms-ring-color,rgba(16,185,129,.188))}.multiselect-wrapper{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;justify-content:flex-end;margin:0 auto;min-height:calc(var(--ms-border-width, 1px)*2 + var(--ms-font-size, 1rem)*var(--ms-line-height, 1.375) + var(--ms-py, .5rem)*2);outline:none;position:relative;width:100%}.multiselect-multiple-label,.multiselect-placeholder,.multiselect-single-label{align-items:center;background:transparent;box-sizing:border-box;display:flex;height:100%;left:0;line-height:var(--ms-line-height,1.375);max-width:100%;padding-left:var(--ms-px,.875rem);padding-right:calc(1.25rem + var(--ms-px, .875rem)*3);pointer-events:none;position:absolute;top:0}.multiselect-placeholder{color:var(--ms-placeholder-color,#9ca3af)}.multiselect-single-label-text{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multiselect-search{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ms-bg,#fff);border:0;border-radius:var(--ms-radius,4px);bottom:0;box-sizing:border-box;font-family:inherit;font-size:inherit;height:100%;left:0;outline:none;padding-left:var(--ms-px,.875rem);position:absolute;right:0;top:0;width:100%}.multiselect-search::-webkit-search-cancel-button,.multiselect-search::-webkit-search-decoration,.multiselect-search::-webkit-search-results-button,.multiselect-search::-webkit-search-results-decoration{-webkit-appearance:none}.multiselect-tags{flex-grow:1;flex-shrink:1;flex-wrap:wrap;margin:var(--ms-tag-my,.25rem) 0 0;padding-left:var(--ms-py,.5rem)}.multiselect-tag,.multiselect-tags{align-items:center;display:flex;min-width:0}.multiselect-tag{background:var(--ms-tag-bg,#10b981);border-radius:var(--ms-tag-radius,4px);color:var(--ms-tag-color,#fff);font-size:var(--ms-tag-font-size,.875rem);font-weight:var(--ms-tag-font-weight,600);line-height:var(--ms-tag-line-height,1.25rem);margin-bottom:var(--ms-tag-my,.25rem);margin-right:var(--ms-tag-mx,.25rem);padding:var(--ms-tag-py,.125rem) 0 var(--ms-tag-py,.125rem) var(--ms-tag-px,.5rem);white-space:nowrap}.multiselect-tag.is-disabled{background:var(--ms-tag-bg-disabled,#9ca3af);color:var(--ms-tag-color-disabled,#fff);padding-right:var(--ms-tag-px,.5rem)}.multiselect-tag-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multiselect-tag-wrapper-break{white-space:normal;word-break:break-all}.multiselect-tag-remove{align-items:center;border-radius:var(--ms-tag-remove-radius,4px);display:flex;justify-content:center;margin:var(--ms-tag-remove-my,0) var(--ms-tag-remove-mx,.125rem);padding:var(--ms-tag-remove-py,.25rem) var(--ms-tag-remove-px,.25rem)}.multiselect-tag-remove:hover{background:#00000010}.multiselect-tag-remove-icon{background-color:currentColor;display:inline-block;height:.75rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;opacity:.8;width:.75rem}.multiselect-tags-search-wrapper{display:inline-block;flex-grow:1;flex-shrink:1;height:100%;margin:0 var(--ms-tag-mx,4px) var(--ms-tag-my,4px);position:relative}.multiselect-tags-search-copy{display:inline-block;height:1px;visibility:hidden;white-space:pre-wrap;width:100%}.multiselect-tags-search{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;bottom:0;box-sizing:border-box;font-family:inherit;font-size:inherit;left:0;outline:none;padding:0;position:absolute;right:0;top:0;width:100%}.multiselect-tags-search::-webkit-search-cancel-button,.multiselect-tags-search::-webkit-search-decoration,.multiselect-tags-search::-webkit-search-results-button,.multiselect-tags-search::-webkit-search-results-decoration{-webkit-appearance:none}.multiselect-inifite{align-items:center;display:flex;justify-content:center;min-height:calc(var(--ms-border-width, 1px)*2 + var(--ms-font-size, 1rem)*var(--ms-line-height, 1.375) + var(--ms-py, .5rem)*2);width:100%}.multiselect-inifite-spinner,.multiselect-spinner{animation:multiselect-spin 1s linear infinite;background-color:var(--ms-spinner-color,#10b981);flex-grow:0;flex-shrink:0;height:1rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 512 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m456.433 371.72-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 512 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m456.433 371.72-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:1rem;z-index:10}.multiselect-spinner{margin:0 var(--ms-px,.875rem) 0 0}.multiselect-clear{display:flex;flex-grow:0;flex-shrink:0;opacity:1;padding:0 var(--ms-px,.875rem) 0 0;position:relative;transition:.3s;z-index:10}.multiselect-clear:hover .multiselect-clear-icon{background-color:var(--ms-clear-color-hover,#000)}.multiselect-clear-icon{background-color:var(--ms-clear-color,#999);display:inline-block;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E");transition:.3s}.multiselect-caret,.multiselect-clear-icon{height:1.125rem;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:.625rem}.multiselect-caret{background-color:var(--ms-caret-color,#999);flex-grow:0;flex-shrink:0;margin:0 var(--ms-px,.875rem) 0 0;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z'/%3E%3C/svg%3E");pointer-events:none;position:relative;transform:rotate(0);transition:transform .3s;z-index:10}.multiselect-caret.is-open{pointer-events:auto;transform:rotate(180deg)}.multiselect-dropdown{-webkit-overflow-scrolling:touch;background:var(--ms-dropdown-bg,#fff);border:var(--ms-dropdown-border-width,1px) solid var(--ms-dropdown-border-color,#d1d5db);border-radius:0 0 var(--ms-dropdown-radius,4px) var(--ms-dropdown-radius,4px);bottom:0;display:flex;flex-direction:column;left:calc(var(--ms-border-width, 1px)*-1);margin-top:calc(var(--ms-border-width, 1px)*-1);max-height:var(--ms-max-height,10rem);outline:none;overflow-y:scroll;position:absolute;right:calc(var(--ms-border-width, 1px)*-1);transform:translateY(100%);z-index:100}.multiselect-dropdown.is-top{border-radius:var(--ms-dropdown-radius,4px) var(--ms-dropdown-radius,4px) 0 0;bottom:auto;top:var(--ms-border-width,1px);transform:translateY(-100%)}.multiselect-dropdown.is-hidden{display:none}.multiselect-options{display:flex;flex-direction:column;list-style:none;margin:0;padding:0}.multiselect-group{margin:0;padding:0}.multiselect-group-label{align-items:center;background:var(--ms-group-label-bg,#e5e7eb);box-sizing:border-box;color:var(--ms-group-label-color,#374151);cursor:default;display:flex;font-size:.875rem;font-weight:600;justify-content:flex-start;line-height:var(--ms-group-label-line-height,1.375);padding:var(--ms-group-label-py,.3rem) var(--ms-group-label-px,.75rem);text-align:left;text-decoration:none}.multiselect-group-label.is-pointable{cursor:pointer}.multiselect-group-label.is-pointed{background:var(--ms-group-label-bg-pointed,#d1d5db);color:var(--ms-group-label-color-pointed,#374151)}.multiselect-group-label.is-selected{background:var(--ms-group-label-bg-selected,#059669);color:var(--ms-group-label-color-selected,#fff)}.multiselect-group-label.is-disabled{background:var(--ms-group-label-bg-disabled,#f3f4f6);color:var(--ms-group-label-color-disabled,#d1d5db);cursor:not-allowed}.multiselect-group-label.is-selected.is-pointed{background:var(--ms-group-label-bg-selected-pointed,#0c9e70);color:var(--ms-group-label-color-selected-pointed,#fff)}.multiselect-group-label.is-selected.is-disabled{background:var(--ms-group-label-bg-selected-disabled,#75cfb1);color:var(--ms-group-label-color-selected-disabled,#d1fae5)}.multiselect-group-options{margin:0;padding:0}.multiselect-option{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;font-size:var(--ms-option-font-size,1rem);justify-content:flex-start;line-height:var(--ms-option-line-height,1.375);padding:var(--ms-option-py,.5rem) var(--ms-option-px,.75rem);text-align:left;text-decoration:none}.multiselect-option.is-pointed{background:var(--ms-option-bg-pointed,#f3f4f6);color:var(--ms-option-color-pointed,#1f2937)}.multiselect-option.is-selected{background:var(--ms-option-bg-selected,#10b981);color:var(--ms-option-color-selected,#fff)}.multiselect-option.is-disabled{background:var(--ms-option-bg-disabled,#fff);color:var(--ms-option-color-disabled,#d1d5db);cursor:not-allowed}.multiselect-option.is-selected.is-pointed{background:var(--ms-option-bg-selected-pointed,#26c08e);color:var(--ms-option-color-selected-pointed,#fff)}.multiselect-option.is-selected.is-disabled{background:var(--ms-option-bg-selected-disabled,#87dcc0);color:var(--ms-option-color-selected-disabled,#d1fae5)}.multiselect-no-options,.multiselect-no-results{color:var(--ms-empty-color,#4b5563);padding:var(--ms-option-py,.5rem) var(--ms-option-px,.75rem)}.multiselect-fake-input{background:transparent;border:0;bottom:-1px;font-size:0;height:1px;left:0;outline:none;padding:0;position:absolute;right:0;width:100%}.multiselect-fake-input:active,.multiselect-fake-input:focus{outline:none}.multiselect-assistive-text{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;position:absolute;width:1px}.multiselect-spacer{display:none}[dir=rtl] .multiselect-multiple-label,[dir=rtl] .multiselect-placeholder,[dir=rtl] .multiselect-single-label{left:auto;padding-left:calc(1.25rem + var(--ms-px, .875rem)*3);padding-right:var(--ms-px,.875rem);right:0}[dir=rtl] .multiselect-search{padding-left:0;padding-right:var(--ms-px,.875rem)}[dir=rtl] .multiselect-tags{padding-left:0;padding-right:var(--ms-py,.5rem)}[dir=rtl] .multiselect-tag{margin-left:var(--ms-tag-mx,.25rem);margin-right:0;padding:var(--ms-tag-py,.125rem) var(--ms-tag-px,.5rem) var(--ms-tag-py,.125rem) 0}[dir=rtl] .multiselect-tag.is-disabled{padding-left:var(--ms-tag-px,.5rem)}[dir=rtl] .multiselect-caret,[dir=rtl] .multiselect-spinner{margin:0 0 0 var(--ms-px,.875rem)}[dir=rtl] .multiselect-clear{padding:0 0 0 var(--ms-px,.875rem)}@keyframes multiselect-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.multiselect-caret{margin-top:.25rem}.dp__input{font-size:.875rem!important;padding-top:.25rem!important;padding-bottom:.25rem!important}.dp__input_wrap{position:relative;width:100%;box-sizing:unset}.dp__input_wrap:focus{border-color:var(--dp-border-color-hover);outline:none}.dp__input_valid{box-shadow:0 0 var(--dp-border-radius) var(--dp-success-color);border-color:var(--dp-success-color)}.dp__input_valid:hover{border-color:var(--dp-success-color)}.dp__input_invalid{box-shadow:0 0 var(--dp-border-radius) var(--dp-danger-color);border-color:var(--dp-danger-color)}.dp__input_invalid:hover{border-color:var(--dp-danger-color)}.dp__input{background-color:var(--dp-background-color);border-radius:var(--dp-border-radius);font-family:var(--dp-font-family);border:1px solid var(--dp-border-color);outline:none;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%;font-size:var(--dp-font-size);line-height:calc(var(--dp-font-size)*1.5);padding:var(--dp-input-padding);color:var(--dp-text-color);box-sizing:border-box}.dp__input::-moz-placeholder{opacity:.7}.dp__input::placeholder{opacity:.7}.dp__input:hover:not(.dp__input_focus){border-color:var(--dp-border-color-hover)}.dp__input_reg{caret-color:#0000}.dp__input_focus{border-color:var(--dp-border-color-focus)}.dp__disabled{background:var(--dp-disabled-color)}.dp__disabled::-moz-placeholder{color:var(--dp-disabled-color-text)}.dp__disabled::placeholder{color:var(--dp-disabled-color-text)}.dp__input_icons{display:inline-block;width:var(--dp-font-size);height:var(--dp-font-size);stroke-width:0;font-size:var(--dp-font-size);line-height:calc(var(--dp-font-size)*1.5);padding:6px 12px;color:var(--dp-icon-color);box-sizing:content-box}.dp__input_icon{cursor:pointer;position:absolute;top:50%;inset-inline-start:0;transform:translateY(-50%);color:var(--dp-icon-color)}.dp__clear_icon{position:absolute;top:50%;inset-inline-end:0;transform:translateY(-50%);cursor:pointer;color:var(--dp-icon-color)}.dp__input_icon_pad{padding-inline-start:var(--dp-input-icon-padding)}.dp__menu{background:var(--dp-background-color);border-radius:var(--dp-border-radius);min-width:var(--dp-menu-min-width);font-family:var(--dp-font-family);font-size:var(--dp-font-size);-webkit-user-select:none;-moz-user-select:none;user-select:none;border:1px solid var(--dp-menu-border-color);box-sizing:border-box}.dp__menu:after{box-sizing:border-box}.dp__menu:before{box-sizing:border-box}.dp__menu:focus{border:1px solid var(--dp-menu-border-color);outline:none}.dp--menu-wrapper{position:absolute;z-index:99999}.dp__menu_inner{padding:var(--dp-menu-padding)}.dp--menu--inner-stretched{padding:6px 0}.dp__menu_index{z-index:99999}.dp-menu-loading,.dp__menu_readonly,.dp__menu_disabled{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999999}.dp__menu_disabled{background:#ffffff80;cursor:not-allowed}.dp__menu_readonly{background:#0000;cursor:default}.dp-menu-loading{background:#ffffff80;cursor:default}.dp--menu-load-container{display:flex;height:100%;width:100%;justify-content:center;align-items:center}.dp--menu-loader{width:48px;height:48px;border:var(--dp-loader);border-bottom-color:#0000;border-radius:50%;display:inline-block;box-sizing:border-box;animation:dp-load-rotation 1s linear infinite;position:absolute}@keyframes dp-load-rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dp__arrow_top{left:var(--dp-arrow-left);top:0;height:12px;width:12px;background-color:var(--dp-background-color);position:absolute;border-inline-end:1px solid var(--dp-menu-border-color);border-top:1px solid var(--dp-menu-border-color);transform:translate(-50%,-50%) rotate(-45deg)}.dp__arrow_bottom{left:var(--dp-arrow-left);bottom:0;height:12px;width:12px;background-color:var(--dp-background-color);position:absolute;border-inline-end:1px solid var(--dp-menu-border-color);border-bottom:1px solid var(--dp-menu-border-color);transform:translate(-50%,50%) rotate(45deg)}.dp__action_extra{text-align:center;padding:2px 0}.dp--preset-dates{padding:5px;border-inline-end:1px solid var(--dp-border-color)}@media only screen and (width <= 600px){.dp--preset-dates{display:flex;align-self:center;border:none;overflow-x:auto;max-width:calc(var(--dp-menu-width) - var(--dp-action-row-padding)*2)}}.dp--preset-dates-collapsed{display:flex;align-self:center;border:none;overflow-x:auto;max-width:calc(var(--dp-menu-width) - var(--dp-action-row-padding)*2)}.dp__sidebar_left{padding:5px;border-inline-end:1px solid var(--dp-border-color)}.dp__sidebar_right{padding:5px;margin-inline-end:1px solid var(--dp-border-color)}.dp--preset-range{display:block;width:100%;padding:5px;text-align:left;white-space:nowrap;color:var(--dp-text-color);border-radius:var(--dp-border-radius);transition:var(--dp-common-transition)}.dp--preset-range:hover{background-color:var(--dp-hover-color);color:var(--dp-hover-text-color);cursor:pointer}@media only screen and (width <= 600px){.dp--preset-range{border:1px solid var(--dp-border-color);margin:0 3px}.dp--preset-range:first-child{margin-left:0}.dp--preset-range:last-child{margin-right:0}}.dp--preset-range-collapsed{border:1px solid var(--dp-border-color);margin:0 3px}.dp--preset-range-collapsed:first-child{margin-left:0}.dp--preset-range-collapsed:last-child{margin-right:0}.dp__menu_content_wrapper{display:flex}@media only screen and (width <= 600px){.dp__menu_content_wrapper{flex-direction:column-reverse}}.dp--menu-content-wrapper-collapsed{flex-direction:column-reverse}.dp__calendar_header{position:relative;display:flex;justify-content:center;align-items:center;color:var(--dp-text-color);white-space:nowrap;font-weight:700}.dp__calendar_header_item{text-align:center;flex-grow:1;height:var(--dp-cell-size);padding:var(--dp-cell-padding);width:var(--dp-cell-size);box-sizing:border-box}.dp__calendar_row{display:flex;justify-content:center;align-items:center;margin:var(--dp-row-margin)}.dp__calendar_item{text-align:center;flex-grow:1;box-sizing:border-box;color:var(--dp-text-color)}.dp__calendar{position:relative}.dp__calendar_header_cell{border-bottom:thin solid var(--dp-border-color);padding:var(--dp-calendar-header-cell-padding)}.dp__cell_inner{display:flex;align-items:center;text-align:center;justify-content:center;border-radius:var(--dp-cell-border-radius);height:var(--dp-cell-size);padding:var(--dp-cell-padding);width:var(--dp-cell-size);border:1px solid rgba(0,0,0,0);box-sizing:border-box;position:relative}.dp__cell_inner:hover{transition:all .2s}.dp__cell_auto_range_start,.dp__date_hover_start:hover,.dp__range_start{border-end-end-radius:0;border-start-end-radius:0}.dp__cell_auto_range_end,.dp__date_hover_end:hover,.dp__range_end{border-end-start-radius:0;border-start-start-radius:0}.dp__range_end,.dp__range_start,.dp__active_date{background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp__date_hover_end:hover,.dp__date_hover_start:hover,.dp__date_hover:hover{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__cell_offset{color:var(--dp-secondary-color)}.dp__cell_disabled{color:var(--dp-secondary-color);cursor:not-allowed}.dp__range_between{background:var(--dp-range-between-dates-background-color);color:var(--dp-range-between-dates-text-color);border-radius:0;border:1px solid var(--dp-range-between-border-color)}.dp__range_between_week{background:var(--dp-primary-color);color:var(--dp-primary-text-color);border-radius:0;border-top:1px solid var(--dp-primary-color);border-bottom:1px solid var(--dp-primary-color)}.dp__today{border:1px solid var(--dp-primary-color)}.dp__week_num{color:var(--dp-secondary-color);text-align:center}.dp__cell_auto_range{border-radius:0;border-top:1px dashed var(--dp-primary-color);border-bottom:1px dashed var(--dp-primary-color)}.dp__cell_auto_range_start{border-start-start-radius:var(--dp-cell-border-radius);border-end-start-radius:var(--dp-cell-border-radius);border-inline-start:1px dashed var(--dp-primary-color);border-top:1px dashed var(--dp-primary-color);border-bottom:1px dashed var(--dp-primary-color)}.dp__cell_auto_range_end{border-start-end-radius:var(--dp-cell-border-radius);border-end-end-radius:var(--dp-cell-border-radius);border-top:1px dashed var(--dp-primary-color);border-bottom:1px dashed var(--dp-primary-color);border-inline-end:1px dashed var(--dp-primary-color)}.dp__calendar_header_separator{width:100%;height:1px;background:var(--dp-border-color)}.dp__calendar_next{margin-inline-start:var(--dp-multi-calendars-spacing)}.dp__marker_line,.dp__marker_dot{height:5px;background-color:var(--dp-marker-color);position:absolute;bottom:0}.dp__marker_dot{width:5px;border-radius:50%;left:50%;transform:translate(-50%)}.dp__marker_line{width:100%;left:0}.dp__marker_tooltip{position:absolute;border-radius:var(--dp-border-radius);background-color:var(--dp-tooltip-color);padding:5px;border:1px solid var(--dp-border-color);z-index:99999;box-sizing:border-box;cursor:default}.dp__tooltip_content{white-space:nowrap}.dp__tooltip_text{display:flex;align-items:center;flex-flow:row nowrap;color:var(--dp-text-color)}.dp__tooltip_mark{height:5px;width:5px;border-radius:50%;background-color:var(--dp-text-color);color:var(--dp-text-color);margin-inline-end:5px}.dp__arrow_bottom_tp{bottom:0;height:8px;width:8px;background-color:var(--dp-tooltip-color);position:absolute;border-inline-end:1px solid var(--dp-border-color);border-bottom:1px solid var(--dp-border-color);transform:translate(-50%,50%) rotate(45deg)}.dp__instance_calendar{position:relative;width:100%}@media only screen and (width <= 600px){.dp__flex_display{flex-direction:column}}.dp--flex-display-collapsed{flex-direction:column}.dp__cell_highlight{background-color:var(--dp-highlight-color)}.dp__month_year_row{display:flex;align-items:center;height:var(--dp-month-year-row-height);color:var(--dp-text-color);box-sizing:border-box}.dp__inner_nav{display:flex;align-items:center;justify-content:center;cursor:pointer;height:var(--dp-month-year-row-button-size);width:var(--dp-month-year-row-button-size);color:var(--dp-icon-color);text-align:center;border-radius:50%}.dp__inner_nav svg{height:var(--dp-button-icon-height);width:var(--dp-button-icon-height)}.dp__inner_nav:hover{background:var(--dp-hover-color);color:var(--dp-hover-icon-color)}[dir=rtl] .dp__inner_nav{transform:rotate(180deg)}.dp__inner_nav_disabled:hover,.dp__inner_nav_disabled{background:var(--dp-disabled-color);color:var(--dp-disabled-color-text);cursor:not-allowed}.dp--year-select,.dp__month_year_select{text-align:center;cursor:pointer;height:var(--dp-month-year-row-height);display:flex;align-items:center;justify-content:center;border-radius:var(--dp-border-radius);box-sizing:border-box;color:var(--dp-text-color)}.dp--year-select:hover,.dp__month_year_select:hover{background:var(--dp-hover-color);color:var(--dp-hover-text-color);transition:var(--dp-common-transition)}.dp__month_year_select{width:50%}.dp--year-select{width:100%}.dp__month_year_wrap{display:flex;flex-direction:row;width:100%}.dp__year_disable_select{justify-content:space-around}.dp--header-wrap{display:flex;width:100%;flex-direction:column}.dp__overlay{width:100%;background:var(--dp-background-color);transition:opacity 1s ease-out;z-index:99999;font-family:var(--dp-font-family);color:var(--dp-text-color);box-sizing:border-box}.dp--overlay-absolute{position:absolute;height:100%;top:0;left:0}.dp--overlay-relative{position:relative}.dp__overlay_container::-webkit-scrollbar-track{box-shadow:var(--dp-scroll-bar-background);background-color:var(--dp-scroll-bar-background)}.dp__overlay_container::-webkit-scrollbar{width:5px;background-color:var(--dp-scroll-bar-background)}.dp__overlay_container::-webkit-scrollbar-thumb{background-color:var(--dp-scroll-bar-color);border-radius:10px}.dp__overlay:focus{border:none;outline:none}.dp__container_flex{display:flex}.dp__container_block{display:block}.dp__overlay_container{flex-direction:column;overflow-y:auto;height:var(--dp-overlay-height)}.dp__time_picker_overlay_container{height:100%}.dp__overlay_row{padding:0;box-sizing:border-box;display:flex;margin-inline:auto auto;flex-wrap:wrap;max-width:100%;width:100%;align-items:center}.dp__flex_row{flex:1}.dp__overlay_col{box-sizing:border-box;width:33%;padding:var(--dp-overlay-col-padding);white-space:nowrap}.dp__overlay_cell_pad{padding:var(--dp-common-padding) 0}.dp__overlay_cell_active{cursor:pointer;border-radius:var(--dp-border-radius);text-align:center;background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp__overlay_cell{cursor:pointer;border-radius:var(--dp-border-radius);text-align:center}.dp__overlay_cell:hover{background:var(--dp-hover-color);color:var(--dp-hover-text-color);transition:var(--dp-common-transition)}.dp__cell_in_between{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__over_action_scroll{right:5px;box-sizing:border-box}.dp__overlay_cell_disabled{cursor:not-allowed;background:var(--dp-disabled-color)}.dp__overlay_cell_disabled:hover{background:var(--dp-disabled-color)}.dp__overlay_cell_active_disabled{cursor:not-allowed;background:var(--dp-primary-disabled-color)}.dp__overlay_cell_active_disabled:hover{background:var(--dp-primary-disabled-color)}.dp__btn,.dp--qr-btn,.dp--time-invalid,.dp--time-overlay-btn{border:none;font:inherit;transition:var(--dp-common-transition);line-height:normal}.dp--tp-wrap{max-width:var(--dp-menu-min-width)}.dp__time_input{width:100%;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-family:var(--dp-font-family);color:var(--dp-text-color)}.dp__time_col_reg_block{padding:0 20px}.dp__time_col_reg_inline{padding:0 10px}.dp__time_col_reg_with_button{padding:0 15px}.dp__time_col_sec{padding:0 10px}.dp__time_col_sec_with_button{padding:0 5px}.dp__time_col{text-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column}.dp__time_col_block{font-size:var(--dp-time-font-size)}.dp__time_display_block{padding:0 3px}.dp__time_display_inline{padding:5px}.dp__time_picker_inline_container{display:flex;width:100%;justify-content:center}.dp__inc_dec_button{padding:5px;margin:0;height:var(--dp-time-inc-dec-button-size);width:var(--dp-time-inc-dec-button-size);display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:50%;color:var(--dp-icon-color);box-sizing:border-box}.dp__inc_dec_button svg{height:var(--dp-time-inc-dec-button-size);width:var(--dp-time-inc-dec-button-size)}.dp__inc_dec_button:hover{background:var(--dp-hover-color);color:var(--dp-primary-color)}.dp__time_display{cursor:pointer;color:var(--dp-text-color);border-radius:var(--dp-border-radius);display:flex;align-items:center;justify-content:center}.dp__time_display:hover:enabled{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__inc_dec_button_inline{width:100%;padding:0;height:8px;cursor:pointer;display:flex;align-items:center}.dp__inc_dec_button_disabled,.dp__inc_dec_button_disabled:hover{background:var(--dp-disabled-color);color:var(--dp-disabled-color-text);cursor:not-allowed}.dp__pm_am_button{background:var(--dp-primary-color);color:var(--dp-primary-text-color);border:none;padding:var(--dp-common-padding);border-radius:var(--dp-border-radius);cursor:pointer}.dp__tp_inline_btn_bar{width:100%;height:4px;background-color:var(--dp-secondary-color);transition:var(--dp-common-transition);border-collapse:collapse}.dp__tp_inline_btn_top:hover .dp__tp_btn_in_r{background-color:var(--dp-primary-color);transform:rotate(12deg) scale(1.15) translateY(-2px)}.dp__tp_inline_btn_top:hover .dp__tp_btn_in_l,.dp__tp_inline_btn_bottom:hover .dp__tp_btn_in_r{background-color:var(--dp-primary-color);transform:rotate(-12deg) scale(1.15) translateY(-2px)}.dp__tp_inline_btn_bottom:hover .dp__tp_btn_in_l{background-color:var(--dp-primary-color);transform:rotate(12deg) scale(1.15) translateY(-2px)}.dp--time-overlay-btn{background:none}.dp--time-invalid{background-color:var(--dp-disabled-color)}.dp__action_row{display:flex;align-items:center;width:100%;padding:var(--dp-action-row-padding);box-sizing:border-box;color:var(--dp-text-color);flex-flow:row nowrap}.dp__action_row svg{height:var(--dp-button-icon-height);width:auto}.dp__selection_preview{display:block;color:var(--dp-text-color);font-size:var(--dp-preview-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dp__action_buttons{display:flex;flex:0;white-space:nowrap;align-items:center;justify-content:flex-end;margin-inline-start:auto}.dp__action_button{display:inline-flex;align-items:center;background:#0000;border:1px solid rgba(0,0,0,0);padding:var(--dp-action-buttons-padding);line-height:var(--dp-action-button-height);margin-inline-start:3px;height:var(--dp-action-button-height);cursor:pointer;border-radius:var(--dp-border-radius);font-size:var(--dp-preview-font-size);font-family:var(--dp-font-family)}.dp__action_cancel{color:var(--dp-text-color);border:1px solid var(--dp-border-color)}.dp__action_cancel:hover{border-color:var(--dp-primary-color);transition:var(--dp-action-row-transtion)}.dp__action_buttons .dp__action_select{background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp__action_buttons .dp__action_select:hover{background:var(--dp-primary-color);transition:var(--dp-action-row-transtion)}.dp__action_buttons .dp__action_select:disabled{background:var(--dp-primary-disabled-color);cursor:not-allowed}.dp-quarter-picker-wrap{display:flex;flex-direction:column;height:100%;min-width:var(--dp-menu-min-width)}.dp--qr-btn-disabled{cursor:not-allowed;background:var(--dp-disabled-color)}.dp--qr-btn-disabled:hover{background:var(--dp-disabled-color)}.dp--qr-btn{width:100%;padding:var(--dp-common-padding)}.dp--qr-btn:not(.dp--highlighted,.dp--qr-btn-active,.dp--qr-btn-disabled,.dp--qr-btn-between){background:none}.dp--qr-btn:hover:not(.dp--qr-btn-active,.dp--qr-btn-disabled){background:var(--dp-hover-color);color:var(--dp-hover-text-color);transition:var(--dp-common-transition)}.dp--quarter-items{display:flex;flex-direction:column;flex:1;width:100%;height:100%;justify-content:space-evenly}.dp--qr-btn-active{background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp--qr-btn-between{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__btn,.dp--time-overlay-btn,.dp--time-invalid,.dp--qr-btn{border:none;font:inherit;transition:var(--dp-common-transition);line-height:normal}.dp--year-mode-picker{display:flex;width:100%;align-items:center;justify-content:space-between;height:var(--dp-cell-size)}:root{--dp-common-transition: all .1s ease-in;--dp-menu-padding: 6px 8px;--dp-animation-duration: .1s;--dp-menu-appear-transition-timing: cubic-bezier(.4, 0, 1, 1);--dp-transition-timing: ease-out;--dp-action-row-transtion: all .2s ease-in;--dp-font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Open Sans", "Helvetica Neue", sans-serif;--dp-border-radius: 4px;--dp-cell-border-radius: 4px;--dp-transition-length: 22px;--dp-transition-timing-general: .1s;--dp-button-height: 35px;--dp-month-year-row-height: 35px;--dp-month-year-row-button-size: 25px;--dp-button-icon-height: 20px;--dp-calendar-wrap-padding: 0 5px;--dp-cell-size: 35px;--dp-cell-padding: 5px;--dp-common-padding: 10px;--dp-input-icon-padding: 35px;--dp-input-padding: 6px 30px 6px 12px;--dp-menu-min-width: 260px;--dp-action-buttons-padding: 1px 6px;--dp-row-margin: 5px 0;--dp-calendar-header-cell-padding: .5rem;--dp-multi-calendars-spacing: 10px;--dp-overlay-col-padding: 3px;--dp-time-inc-dec-button-size: 32px;--dp-font-size: 1rem;--dp-preview-font-size: .8rem;--dp-time-font-size: 2rem;--dp-action-button-height: 22px;--dp-action-row-padding: 8px}.dp__theme_dark{--dp-background-color: #212121;--dp-text-color: #fff;--dp-hover-color: #484848;--dp-hover-text-color: #fff;--dp-hover-icon-color: #959595;--dp-primary-color: #005cb2;--dp-primary-disabled-color: #61a8ea;--dp-primary-text-color: #fff;--dp-secondary-color: #a9a9a9;--dp-border-color: #2d2d2d;--dp-menu-border-color: #2d2d2d;--dp-border-color-hover: #aaaeb7;--dp-border-color-focus: #aaaeb7;--dp-disabled-color: #737373;--dp-disabled-color-text: #d0d0d0;--dp-scroll-bar-background: #212121;--dp-scroll-bar-color: #484848;--dp-success-color: #00701a;--dp-success-color-disabled: #428f59;--dp-icon-color: #959595;--dp-danger-color: #e53935;--dp-marker-color: #e53935;--dp-tooltip-color: #3e3e3e;--dp-highlight-color: rgb(0 92 178 / 20%);--dp-range-between-dates-background-color: var(--dp-hover-color, #484848);--dp-range-between-dates-text-color: var(--dp-hover-text-color, #fff);--dp-range-between-border-color: var(--dp-hover-color, #fff);--dp-loader: 5px solid #005cb2}.dp__theme_light{--dp-background-color: #fff;--dp-text-color: #212121;--dp-hover-color: #f3f3f3;--dp-hover-text-color: #212121;--dp-hover-icon-color: #959595;--dp-primary-color: #1976d2;--dp-primary-disabled-color: #6bacea;--dp-primary-text-color: #f8f5f5;--dp-secondary-color: #c0c4cc;--dp-border-color: #ddd;--dp-menu-border-color: #ddd;--dp-border-color-hover: #aaaeb7;--dp-border-color-focus: #aaaeb7;--dp-disabled-color: #f6f6f6;--dp-scroll-bar-background: #f3f3f3;--dp-scroll-bar-color: #959595;--dp-success-color: #76d275;--dp-success-color-disabled: #a3d9b1;--dp-icon-color: #959595;--dp-danger-color: #ff6f60;--dp-marker-color: #ff6f60;--dp-tooltip-color: #fafafa;--dp-disabled-color-text: #8e8e8e;--dp-highlight-color: rgb(25 118 210 / 10%);--dp-range-between-dates-background-color: var(--dp-hover-color, #f3f3f3);--dp-range-between-dates-text-color: var(--dp-hover-text-color, #212121);--dp-range-between-border-color: var(--dp-hover-color, #f3f3f3);--dp-loader: 5px solid #1976d2}.dp__flex{display:flex;align-items:center}.dp__btn{background:none}.dp__main{font-family:var(--dp-font-family);-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;position:relative;width:100%}.dp__pointer{cursor:pointer}.dp__icon{stroke:currentcolor;fill:currentcolor}.dp__button{width:100%;text-align:center;color:var(--dp-icon-color);cursor:pointer;display:flex;align-items:center;place-content:center center;padding:var(--dp-common-padding);box-sizing:border-box;height:var(--dp-button-height)}.dp__button.dp__overlay_action{position:absolute;bottom:0}.dp__button:hover{background:var(--dp-hover-color);color:var(--dp-hover-icon-color)}.dp__button svg{height:var(--dp-button-icon-height);width:auto}.dp__button_bottom{border-bottom-left-radius:var(--dp-border-radius);border-bottom-right-radius:var(--dp-border-radius)}.dp__flex_display{display:flex}.dp__flex_display_with_input{flex-direction:column;align-items:flex-start}.dp__relative{position:relative}.calendar-next-enter-active,.calendar-next-leave-active,.calendar-prev-enter-active,.calendar-prev-leave-active{transition:all var(--dp-transition-timing-general) ease-out}.calendar-next-enter-from{opacity:0;transform:translate(var(--dp-transition-length))}.calendar-next-leave-to,.calendar-prev-enter-from{opacity:0;transform:translate(calc(var(--dp-transition-length) * -1))}.calendar-prev-leave-to{opacity:0;transform:translate(var(--dp-transition-length))}.dp-menu-appear-bottom-enter-active,.dp-menu-appear-bottom-leave-active,.dp-menu-appear-top-enter-active,.dp-menu-appear-top-leave-active,.dp-slide-up-enter-active,.dp-slide-up-leave-active,.dp-slide-down-enter-active,.dp-slide-down-leave-active{transition:all var(--dp-animation-duration) var(--dp-transition-timing)}.dp-menu-appear-top-enter-from,.dp-menu-appear-top-leave-to,.dp-slide-down-leave-to,.dp-slide-up-enter-from{opacity:0;transform:translateY(var(--dp-transition-length))}.dp-menu-appear-bottom-enter-from,.dp-menu-appear-bottom-leave-to,.dp-slide-down-enter-from,.dp-slide-up-leave-to{opacity:0;transform:translateY(calc(var(--dp-transition-length) * -1))}.dp--arrow-btn-nav{transition:var(--dp-common-transition)}.dp--highlighted{background-color:var(--dp-highlight-color)}.dp__theme_light[data-v-2ae7e4b5]{--dp-background-color: none;--dp-text-color: none;--dp-hover-color: none;--dp-hover-text-color: none;--dp-hover-icon-color: none;--dp-primary-color: none;--dp-primary-disabled-color: none;--dp-primary-text-color: none;--dp-secondary-color: none;--dp-border-color: none;--dp-menu-border-color: none;--dp-border-color-hover: none;--dp-disabled-color: none;--dp-scroll-bar-background: none;--dp-scroll-bar-color: none;--dp-success-color: none;--dp-success-color-disabled: none;--dp-icon-color: none;--dp-danger-color: none;--dp-marker-color: none;--dp-tooltip-color: none;--dp-disabled-color-text: none;--dp-highlight-color: none;--dp-range-between-dates-background-color: none;--dp-range-between-dates-text-color: none;--dp-range-between-border-color: none}.dp__input_valid[data-v-2ae7e4b5]{box-shadow:none}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:currentColor transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.wpuf-avatar{position:relative;display:inline-flex}.wpuf-avatar>div{display:block;aspect-ratio:1 / 1;overflow:hidden}.wpuf-avatar img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.wpuf-avatar.wpuf-placeholder>div{display:flex;align-items:center;justify-content:center}.wpuf-avatar-group :where(.wpuf-avatar){overflow:hidden;border-radius:9999px;border-width:4px;--tw-border-opacity: 1;border-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-border-opacity)))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}.wpuf-loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.wpuf-tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}.wpuf-tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}.wpuf-tooltip:before,.wpuf-tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.wpuf-avatar.wpuf-online:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}.wpuf-avatar.wpuf-offline:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}.wpuf-tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: .1875rem;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + .0625rem - var(--tooltip-tail))}.wpuf-tooltip:before,.wpuf-tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.wpuf-tooltip:after{position:absolute;content:"";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.wpuf-tooltip:before{max-width:20rem;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.wpuf-tooltip.wpuf-tooltip-open:before{opacity:1;transition-delay:75ms}.wpuf-tooltip.wpuf-tooltip-open:after{opacity:1;transition-delay:75ms}.wpuf-tooltip:hover:before{opacity:1;transition-delay:75ms}.wpuf-tooltip:hover:after{opacity:1;transition-delay:75ms}.wpuf-tooltip:has(:focus-visible):after,.wpuf-tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.wpuf-tooltip:not([data-tip]):hover:before,.wpuf-tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.wpuf-tooltip:after,.wpuf-tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.wpuf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wpuf-pointer-events-none{pointer-events:none}.wpuf-fixed{position:fixed}.wpuf-absolute{position:absolute}.wpuf-relative{position:relative}.wpuf-inset-0{top:0;right:0;bottom:0;left:0}.wpuf-inset-y-0{top:0;bottom:0}.wpuf--left-20{left:-5rem}.wpuf-left-0{left:0}.wpuf-left-\[-2\%\]{left:-2%}.wpuf-left-\[-20px\]{left:-20px}.wpuf-left-\[calc\(50\%-5rem\)\]{left:calc(50% - 5rem)}.wpuf-right-0{right:0}.wpuf-right-8{right:2rem}.wpuf-top-0{top:0}.wpuf-top-1\/3{top:33.333333%}.wpuf-top-20{top:5rem}.wpuf-top-\[-40\%\]{top:-40%}.wpuf-z-10{z-index:10}.wpuf-z-20{z-index:20}.wpuf-z-40{z-index:40}.wpuf-z-50{z-index:50}.wpuf-z-\[9999\]{z-index:9999}.wpuf-col-span-2{grid-column:span 2 / span 2}.wpuf-m-0{margin:0}.wpuf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.wpuf--mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.wpuf--my-1{margin-top:-.25rem;margin-bottom:-.25rem}.wpuf--my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.wpuf-mx-auto{margin-left:auto;margin-right:auto}.wpuf-my-8{margin-top:2rem;margin-bottom:2rem}.wpuf--mb-px{margin-bottom:-1px}.wpuf-mb-0{margin-bottom:0}.wpuf-mb-1{margin-bottom:.25rem}.wpuf-mb-4{margin-bottom:1rem}.wpuf-mb-5{margin-bottom:1.25rem}.wpuf-me-2{margin-inline-end:.5rem}.wpuf-ml-1{margin-left:.25rem}.wpuf-ml-2{margin-left:.5rem}.wpuf-ml-3{margin-left:.75rem}.wpuf-ml-4{margin-left:1rem}.wpuf-mr-1{margin-right:.25rem}.wpuf-mr-2{margin-right:.5rem}.wpuf-mr-4{margin-right:1rem}.wpuf-mt-0{margin-top:0}.wpuf-mt-1{margin-top:.25rem}.wpuf-mt-12{margin-top:3rem}.wpuf-mt-2{margin-top:.5rem}.wpuf-mt-4{margin-top:1rem}.wpuf-mt-5{margin-top:1.25rem}.wpuf-mt-8{margin-top:2rem}.wpuf-block{display:block}.wpuf-inline-block{display:inline-block}.wpuf-flex{display:flex}.wpuf-inline-flex{display:inline-flex}.wpuf-grid{display:grid}.wpuf-contents{display:contents}.wpuf-hidden{display:none}.wpuf-h-10{height:2.5rem}.wpuf-h-12{height:3rem}.wpuf-h-3{height:.75rem}.wpuf-h-5{height:1.25rem}.wpuf-h-6{height:1.5rem}.wpuf-h-8{height:2rem}.wpuf-h-80{height:20rem}.wpuf-h-\[180\%\]{height:180%}.wpuf-h-\[50vh\]{height:50vh}.wpuf-h-full{height:100%}.wpuf-h-max{height:-moz-max-content;height:max-content}.wpuf-h-screen{height:100vh}.wpuf-h-svh{height:100svh}.wpuf-min-h-full{min-height:100%}.wpuf-min-h-max{min-height:-moz-max-content;min-height:max-content}.wpuf-min-h-screen{min-height:100vh}.wpuf-w-1\/3{width:33.333333%}.wpuf-w-1\/4{width:25%}.wpuf-w-1\/5{width:20%}.wpuf-w-10{width:2.5rem}.wpuf-w-11{width:2.75rem}.wpuf-w-12{width:3rem}.wpuf-w-2\/5{width:40%}.wpuf-w-3{width:.75rem}.wpuf-w-3\/5{width:60%}.wpuf-w-44{width:11rem}.wpuf-w-5{width:1.25rem}.wpuf-w-6{width:1.5rem}.wpuf-w-8{width:2rem}.wpuf-w-\[104\%\]{width:104%}.wpuf-w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.wpuf-w-auto{width:auto}.wpuf-w-fit{width:-moz-fit-content;width:fit-content}.wpuf-w-full{width:100%}.wpuf-w-max{width:-moz-max-content;width:max-content}.wpuf-w-screen{width:100vw}.wpuf-min-w-0{min-width:0px}.\!wpuf-max-w-full{max-width:100%!important}.wpuf-max-w-lg{max-width:32rem}.wpuf-max-w-xs{max-width:20rem}.wpuf-flex-1{flex:1 1 0%}.wpuf-flex-none{flex:none}.wpuf-flex-shrink{flex-shrink:1}.wpuf-flex-shrink-0{flex-shrink:0}.wpuf-flex-grow{flex-grow:1}.wpuf-basis-1\/5{flex-basis:20%}.wpuf-basis-4\/5{flex-basis:80%}.wpuf-translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.wpuf-translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.wpuf-rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.wpuf-rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.wpuf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.wpuf-cursor-not-allowed{cursor:not-allowed}.wpuf-cursor-pointer{cursor:pointer}.wpuf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.wpuf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.wpuf-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.wpuf-flex-row{flex-direction:row}.wpuf-flex-row-reverse{flex-direction:row-reverse}.wpuf-flex-col{flex-direction:column}.wpuf-flex-wrap{flex-wrap:wrap}.wpuf-items-start{align-items:flex-start}.wpuf-items-center{align-items:center}.wpuf-items-baseline{align-items:baseline}.wpuf-justify-start{justify-content:flex-start}.wpuf-justify-end{justify-content:flex-end}.wpuf-justify-center{justify-content:center}.wpuf-justify-between{justify-content:space-between}.wpuf-justify-around{justify-content:space-around}.wpuf-gap-3{gap:.75rem}.wpuf-gap-4{gap:1rem}.wpuf-gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.wpuf--space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.wpuf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.wpuf-overflow-hidden{overflow:hidden}.wpuf-overflow-y-auto{overflow-y:auto}.wpuf-whitespace-nowrap{white-space:nowrap}.wpuf-rounded{border-radius:.25rem}.wpuf-rounded-full{border-radius:9999px}.wpuf-rounded-lg{border-radius:.5rem}.wpuf-rounded-md{border-radius:.375rem}.wpuf-rounded-xl{border-radius:.75rem}.wpuf-rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.wpuf-rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.wpuf-rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.wpuf-rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.wpuf-rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.wpuf-rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.wpuf-rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.wpuf-border{border-width:1px}.wpuf-border-2{border-width:2px}.wpuf-border-b{border-bottom-width:1px}.wpuf-border-b-2{border-bottom-width:2px}.wpuf-border-r-2{border-right-width:2px}.wpuf-border-t{border-top-width:1px}.wpuf-border-dashed{border-style:dashed}.\!wpuf-border-hidden{border-style:hidden!important}.\!wpuf-border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.\!wpuf-border-red-500{--tw-border-opacity: 1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity))!important}.wpuf-border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.wpuf-border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.wpuf-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.wpuf-border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.wpuf-border-transparent{border-color:transparent}.wpuf-bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.wpuf-bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity))}.wpuf-bg-black\/25{background-color:#00000040}.wpuf-bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.wpuf-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.wpuf-bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.wpuf-bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.wpuf-bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.wpuf-bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.wpuf-bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity))}.wpuf-bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.wpuf-bg-indigo-700{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.wpuf-bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity))}.wpuf-bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.wpuf-bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.wpuf-bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.wpuf-bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.wpuf-bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.wpuf-bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.wpuf-bg-transparent{background-color:transparent}.wpuf-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.wpuf-bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.wpuf-bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.wpuf-bg-opacity-75{--tw-bg-opacity: .75}.wpuf-p-0{padding:0}.wpuf-p-1{padding:.25rem}.wpuf-p-1\.5{padding:.375rem}.wpuf-p-2{padding:.5rem}.wpuf-p-4{padding:1rem}.wpuf-p-5{padding:1.25rem}.wpuf-p-6{padding:1.5rem}.wpuf-px-12{padding-left:3rem;padding-right:3rem}.wpuf-px-2{padding-left:.5rem;padding-right:.5rem}.wpuf-px-2\.5{padding-left:.625rem;padding-right:.625rem}.wpuf-px-3{padding-left:.75rem;padding-right:.75rem}.wpuf-px-4{padding-left:1rem;padding-right:1rem}.wpuf-px-5{padding-left:1.25rem;padding-right:1.25rem}.wpuf-px-6{padding-left:1.5rem;padding-right:1.5rem}.wpuf-px-8{padding-left:2rem;padding-right:2rem}.wpuf-py-0{padding-top:0;padding-bottom:0}.wpuf-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.wpuf-py-1{padding-top:.25rem;padding-bottom:.25rem}.wpuf-py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.wpuf-py-2{padding-top:.5rem;padding-bottom:.5rem}.wpuf-py-3{padding-top:.75rem;padding-bottom:.75rem}.wpuf-py-4{padding-top:1rem;padding-bottom:1rem}.wpuf-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.wpuf-py-6{padding-top:1.5rem;padding-bottom:1.5rem}.wpuf-py-8{padding-top:2rem;padding-bottom:2rem}.wpuf-pb-4{padding-bottom:1rem}.wpuf-pb-6{padding-bottom:1.5rem}.wpuf-pb-8{padding-bottom:2rem}.wpuf-pl-1{padding-left:.25rem}.wpuf-pl-2{padding-left:.5rem}.wpuf-pl-3{padding-left:.75rem}.wpuf-pl-4{padding-left:1rem}.wpuf-pr-10{padding-right:2.5rem}.wpuf-pr-2{padding-right:.5rem}.wpuf-pr-3{padding-right:.75rem}.wpuf-pr-4{padding-right:1rem}.wpuf-pr-\[20px\]{padding-right:20px}.wpuf-pt-1{padding-top:.25rem}.wpuf-pt-4{padding-top:1rem}.wpuf-pt-5{padding-top:1.25rem}.wpuf-text-left{text-align:left}.wpuf-text-center{text-align:center}.wpuf-text-end{text-align:end}.wpuf-text-2xl{font-size:1.5rem;line-height:2rem}.wpuf-text-3xl{font-size:1.875rem;line-height:2.25rem}.wpuf-text-base{font-size:1rem;line-height:1.5rem}.wpuf-text-lg{font-size:1.125rem;line-height:1.75rem}.wpuf-text-sm{font-size:.875rem;line-height:1.25rem}.wpuf-text-xs{font-size:.75rem;line-height:1rem}.wpuf-font-bold{font-weight:700}.wpuf-font-medium{font-weight:500}.wpuf-font-normal{font-weight:400}.wpuf-font-semibold{font-weight:600}.wpuf-italic{font-style:italic}.wpuf-leading-10{line-height:2.5rem}.wpuf-leading-6{line-height:1.5rem}.wpuf-tracking-tight{letter-spacing:-.025em}.\!wpuf-text-red-900{--tw-text-opacity: 1 !important;color:rgb(127 29 29 / var(--tw-text-opacity))!important}.wpuf-text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.wpuf-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.wpuf-text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.wpuf-text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.wpuf-text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.wpuf-text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.wpuf-text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.wpuf-text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.wpuf-text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.wpuf-text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.wpuf-text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.wpuf-text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.wpuf-text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.wpuf-text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.wpuf-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.wpuf-text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.wpuf-text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.\!wpuf-shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.wpuf-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.wpuf-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.wpuf-shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.wpuf-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.wpuf-ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.wpuf-ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.wpuf-ring-inset{--tw-ring-inset: inset}.wpuf-ring-blue-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity))}.wpuf-ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.wpuf-ring-gray-900\/5{--tw-ring-color: rgb(17 24 39 / .05)}.wpuf-ring-green-600\/20{--tw-ring-color: rgb(22 163 74 / .2)}.wpuf-ring-indigo-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.wpuf-ring-orange-600\/10{--tw-ring-color: rgb(234 88 12 / .1)}.wpuf-ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity))}.wpuf-ring-red-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.wpuf-ring-red-600\/10{--tw-ring-color: rgb(220 38 38 / .1)}.wpuf-ring-slate-600\/10{--tw-ring-color: rgb(71 85 105 / .1)}.wpuf-ring-yellow-600\/10{--tw-ring-color: rgb(202 138 4 / .1)}.wpuf-blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.wpuf-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.wpuf-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.wpuf-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.wpuf-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.wpuf-duration-200{transition-duration:.2s}.wpuf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.wpuf-inline-input .wpuf-p-4{padding:0}.wpuf-inline-input>*:first-child{margin-right:1rem}body.user-frontend_page_wpuf_subscription{background:#fff}.placeholder\:wpuf-text-red-300::-moz-placeholder{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.placeholder\:wpuf-text-red-300::placeholder{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.before\:wpuf-absolute:before{content:var(--tw-content);position:absolute}.before\:wpuf--top-6:before{content:var(--tw-content);top:-1.5rem}.before\:wpuf-mt-3:before{content:var(--tw-content);margin-top:.75rem}.before\:wpuf-h-3:before{content:var(--tw-content);height:.75rem}.after\:wpuf-absolute:after{content:var(--tw-content);position:absolute}.after\:wpuf-border:after{content:var(--tw-content);border-width:1px}.after\:wpuf-border-b-0:after{content:var(--tw-content);border-bottom-width:0px}.after\:wpuf-border-r-0:after{content:var(--tw-content);border-right-width:0px}.after\:wpuf-bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:wpuf-block:hover{display:block}.hover\:wpuf-cursor-pointer:hover{cursor:pointer}.hover\:wpuf-border-b-2:hover{border-bottom-width:2px}.hover\:wpuf-border-blue-600:hover{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.hover\:wpuf-border-blue-700:hover{--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity))}.hover\:wpuf-border-red-700:hover{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity))}.hover\:wpuf-bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity))}.hover\:wpuf-bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:wpuf-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:wpuf-bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:wpuf-bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:wpuf-bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\:wpuf-bg-indigo-800:hover{--tw-bg-opacity: 1;background-color:rgb(55 48 163 / var(--tw-bg-opacity))}.hover\:wpuf-bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\:wpuf-bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:wpuf-bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.hover\:wpuf-text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:wpuf-text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:wpuf-text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:wpuf-text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.hover\:wpuf-text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:wpuf-shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:wpuf-z-20:focus{z-index:20}.focus\:\!wpuf-border-indigo-500:focus{--tw-border-opacity: 1 !important;border-color:rgb(99 102 241 / var(--tw-border-opacity))!important}.focus\:wpuf-bg-amber-600:focus{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity))}.focus\:wpuf-bg-indigo-500:focus{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.focus\:wpuf-bg-slate-100:focus{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.focus\:wpuf-text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\:wpuf-shadow-none:focus{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:wpuf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:wpuf-ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:wpuf-ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:wpuf-ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:wpuf-ring-inset:focus{--tw-ring-inset: inset}.focus\:wpuf-ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity))}.focus\:wpuf-ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:wpuf-ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:wpuf-ring-red-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity))}.focus\:wpuf-ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus-visible\:wpuf-outline:focus-visible{outline-style:solid}.focus-visible\:wpuf-outline-2:focus-visible{outline-width:2px}.focus-visible\:wpuf-outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:wpuf-outline-indigo-600:focus-visible{outline-color:#4f46e5}.active\:wpuf-shadow-none:active{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.wpuf-group:hover .group-hover\:wpuf-flex{display:flex}.wpuf-group:hover .group-hover\:wpuf-cursor-pointer{cursor:pointer}.wpuf-peer:hover~.peer-hover\:wpuf-block{display:block}@media (min-width: 640px){.sm\:wpuf-p-0{padding:0}.sm\:wpuf-text-sm{font-size:.875rem;line-height:1.25rem}}.rtl\:wpuf-left-auto:where([dir=rtl],[dir=rtl] *){left:auto}.rtl\:wpuf-right-0:where([dir=rtl],[dir=rtl] *){right:0}.rtl\:wpuf-ml-1:where([dir=rtl],[dir=rtl] *){margin-left:.25rem}.rtl\:wpuf-mr-0:where([dir=rtl],[dir=rtl] *){margin-right:0}.rtl\:wpuf-pl-0:where([dir=rtl],[dir=rtl] *){padding-left:0}.rtl\:wpuf-pr-2:where([dir=rtl],[dir=rtl] *){padding-right:.5rem}.rtl\:wpuf-text-right:where([dir=rtl],[dir=rtl] *){text-align:right} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider providing a non-minified version of the CSS file.
Minified files are challenging to review and maintain. Including a non-minified version can help with readability and future modifications.
onBeforeMount(() => { | ||
subscriptionStore.setBlankSubscription(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure error handling for setBlankSubscription
.
Consider adding error handling for setBlankSubscription
to manage potential failures.
onBeforeMount(() => {
- subscriptionStore.setBlankSubscription();
+ try {
+ subscriptionStore.setBlankSubscription();
+ } catch (error) {
+ noticeStore.display = true;
+ noticeStore.type = 'danger';
+ noticeStore.message = 'Failed to initialize subscription.';
+ }
});
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
onBeforeMount(() => { | |
subscriptionStore.setBlankSubscription(); | |
}); | |
onBeforeMount(() => { | |
try { | |
subscriptionStore.setBlankSubscription(); | |
} catch (error) { | |
noticeStore.display = true; | |
noticeStore.type = 'danger'; | |
noticeStore.message = 'Failed to initialize subscription.'; | |
} | |
}); |
const updateSubscription = () => { | ||
subscriptionStore.isUpdating = true; | ||
subscriptionStore.resetErrors(); | ||
|
||
if(!subscriptionStore.validateFields()) { | ||
subscriptionStore.isUpdating = false; | ||
|
||
return; | ||
} | ||
|
||
subscriptionStore.isSubscriptionLoading = true; | ||
|
||
const promiseResult = subscriptionStore.updateSubscription(); | ||
|
||
promiseResult.then((result) => { | ||
if (result.success) { | ||
noticeStore.display = true; | ||
noticeStore.type = 'success'; | ||
noticeStore.message = result.message; | ||
|
||
subscriptionStore.setSubscriptionsByStatus( subscriptionStore.currentSubscriptionStatus ); | ||
componentStore.setCurrentComponent( 'List' ); | ||
subscriptionStore.getSubscriptionCount(); | ||
} else { | ||
noticeStore.display = true; | ||
noticeStore.type = 'danger'; | ||
noticeStore.message = result.message; | ||
} | ||
|
||
subscriptionStore.isUpdating = false; | ||
|
||
setTimeout(() => { | ||
noticeStore.display = false; | ||
noticeStore.type = ''; | ||
noticeStore.message = ''; | ||
}, 3000); | ||
|
||
}).finally(() => { | ||
subscriptionStore.isSubscriptionLoading = false; | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve error handling and readability in updateSubscription
.
- Add error handling for
updateSubscription
. - Improve readability by breaking down the function into smaller parts.
const updateSubscription = () => {
- subscriptionStore.isUpdating = true;
- subscriptionStore.resetErrors();
-
- if(!subscriptionStore.validateFields()) {
- subscriptionStore.isUpdating = false;
- return;
- }
-
- subscriptionStore.isSubscriptionLoading = true;
-
- const promiseResult = subscriptionStore.updateSubscription();
-
- promiseResult.then((result) => {
- if (result.success) {
- noticeStore.display = true;
- noticeStore.type = 'success';
- noticeStore.message = result.message;
-
- subscriptionStore.setSubscriptionsByStatus( subscriptionStore.currentSubscriptionStatus );
- componentStore.setCurrentComponent( 'List' );
- subscriptionStore.getSubscriptionCount();
- } else {
- noticeStore.display = true;
- noticeStore.type = 'danger';
- noticeStore.message = result.message;
- }
- subscriptionStore.isUpdating = false;
- setTimeout(() => {
- noticeStore.display = false;
- noticeStore.type = '';
- noticeStore.message = '';
- }, 3000);
- }).finally(() => {
- subscriptionStore.isSubscriptionLoading = false;
- });
+ try {
+ subscriptionStore.isUpdating = true;
+ subscriptionStore.resetErrors();
+
+ if(!subscriptionStore.validateFields()) {
+ subscriptionStore.isUpdating = false;
+ return;
+ }
+
+ subscriptionStore.isSubscriptionLoading = true;
+
+ const promiseResult = subscriptionStore.updateSubscription();
+
+ promiseResult.then((result) => {
+ handleSubscriptionUpdate(result);
+ }).finally(() => {
+ subscriptionStore.isSubscriptionLoading = false;
+ });
+ } catch (error) {
+ noticeStore.display = true;
+ noticeStore.type = 'danger';
+ noticeStore.message = 'An error occurred while updating the subscription.';
+ subscriptionStore.isUpdating = false;
+ }
};
const handleSubscriptionUpdate = (result) => {
+ if (result.success) {
+ noticeStore.display = true;
+ noticeStore.type = 'success';
+ noticeStore.message = result.message;
+
+ subscriptionStore.setSubscriptionsByStatus( subscriptionStore.currentSubscriptionStatus );
+ componentStore.setCurrentComponent( 'List' );
+ subscriptionStore.getSubscriptionCount();
+ } else {
+ noticeStore.display = true;
+ noticeStore.type = 'danger';
+ noticeStore.message = result.message;
+ }
+ subscriptionStore.isUpdating = false;
+ setTimeout(() => {
+ noticeStore.display = false;
+ noticeStore.type = '';
+ noticeStore.message = '';
+ }, 3000);
};
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const updateSubscription = () => { | |
subscriptionStore.isUpdating = true; | |
subscriptionStore.resetErrors(); | |
if(!subscriptionStore.validateFields()) { | |
subscriptionStore.isUpdating = false; | |
return; | |
} | |
subscriptionStore.isSubscriptionLoading = true; | |
const promiseResult = subscriptionStore.updateSubscription(); | |
promiseResult.then((result) => { | |
if (result.success) { | |
noticeStore.display = true; | |
noticeStore.type = 'success'; | |
noticeStore.message = result.message; | |
subscriptionStore.setSubscriptionsByStatus( subscriptionStore.currentSubscriptionStatus ); | |
componentStore.setCurrentComponent( 'List' ); | |
subscriptionStore.getSubscriptionCount(); | |
} else { | |
noticeStore.display = true; | |
noticeStore.type = 'danger'; | |
noticeStore.message = result.message; | |
} | |
subscriptionStore.isUpdating = false; | |
setTimeout(() => { | |
noticeStore.display = false; | |
noticeStore.type = ''; | |
noticeStore.message = ''; | |
}, 3000); | |
}).finally(() => { | |
subscriptionStore.isSubscriptionLoading = false; | |
}); | |
}; | |
const updateSubscription = () => { | |
try { | |
subscriptionStore.isUpdating = true; | |
subscriptionStore.resetErrors(); | |
if(!subscriptionStore.validateFields()) { | |
subscriptionStore.isUpdating = false; | |
return; | |
} | |
subscriptionStore.isSubscriptionLoading = true; | |
const promiseResult = subscriptionStore.updateSubscription(); | |
promiseResult.then((result) => { | |
handleSubscriptionUpdate(result); | |
}).finally(() => { | |
subscriptionStore.isSubscriptionLoading = false; | |
}); | |
} catch (error) { | |
noticeStore.display = true; | |
noticeStore.type = 'danger'; | |
noticeStore.message = 'An error occurred while updating the subscription.'; | |
subscriptionStore.isUpdating = false; | |
} | |
}; | |
const handleSubscriptionUpdate = (result) => { | |
if (result.success) { | |
noticeStore.display = true; | |
noticeStore.type = 'success'; | |
noticeStore.message = result.message; | |
subscriptionStore.setSubscriptionsByStatus( subscriptionStore.currentSubscriptionStatus ); | |
componentStore.setCurrentComponent( 'List' ); | |
subscriptionStore.getSubscriptionCount(); | |
} else { | |
noticeStore.display = true; | |
noticeStore.type = 'danger'; | |
noticeStore.message = result.message; | |
} | |
subscriptionStore.isUpdating = false; | |
setTimeout(() => { | |
noticeStore.display = false; | |
noticeStore.type = ''; | |
noticeStore.message = ''; | |
}, 3000); | |
}; |
import {computed, toRefs} from 'vue'; | ||
import SectionInputField from './SectionInputField.vue'; | ||
import {useFieldDependencyStore} from '../../stores/fieldDependency'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optimize imports.
The computed
and toRefs
imports from vue
can be combined into a single line.
- import {computed, toRefs} from 'vue';
+ import { computed, toRefs } from 'vue';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import {computed, toRefs} from 'vue'; | |
import SectionInputField from './SectionInputField.vue'; | |
import {useFieldDependencyStore} from '../../stores/fieldDependency'; | |
import { computed, toRefs } from 'vue'; | |
import SectionInputField from './SectionInputField.vue'; | |
import {useFieldDependencyStore} from '../../stores/fieldDependency'; |
const isRecurring = computed(() => { | ||
return currentSubscription.meta_value.recurring_pay === 'on' || currentSubscription.meta_value.recurring_pay === 'yes'; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify Computed Property.
The computed property can be simplified by directly returning the condition.
- const isRecurring = computed(() => {
- return currentSubscription.meta_value.recurring_pay === 'on' || currentSubscription.meta_value.recurring_pay === 'yes';
- });
+ const isRecurring = computed(() => currentSubscription.meta_value.recurring_pay === 'on' || currentSubscription.meta_value.recurring_pay === 'yes');
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const isRecurring = computed(() => { | |
return currentSubscription.meta_value.recurring_pay === 'on' || currentSubscription.meta_value.recurring_pay === 'yes'; | |
}); | |
const isRecurring = computed(() => currentSubscription.meta_value.recurring_pay === 'on' || currentSubscription.meta_value.recurring_pay === 'yes'); |
showPackDropdown: function(e) { | ||
e.preventDefault(); | ||
var self = $(this), | ||
wrap = self.parents('.wpuf-user-subscription'), | ||
sub_dropdown = wrap.find('.wpuf-pack-dropdown'), | ||
sub_details = wrap.find('.wpuf-user-sub-info'), | ||
cancel_btn = wrap.find('.wpuf-cancel-pack'), | ||
add_btn = wrap.find('.wpuf-add-pack'); | ||
|
||
if ( sub_dropdown.attr( 'disabled' ) === 'disabled' ) { | ||
sub_dropdown.show().removeAttr('disabled'); | ||
sub_details.hide().attr('disabled', true ); | ||
cancel_btn.show(); | ||
add_btn.hide(); | ||
} else { | ||
sub_details.show().removeAttr('disabled'); | ||
sub_dropdown.hide().attr('disabled', true ); | ||
cancel_btn.hide(); | ||
add_btn.show(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify the showPackDropdown
function.
The function can be simplified by using a single condition to toggle the elements.
- if ( sub_dropdown.attr( 'disabled' ) === 'disabled' ) {
- sub_dropdown.show().removeAttr('disabled');
- sub_details.hide().attr('disabled', true );
- cancel_btn.show();
- add_btn.hide();
- } else {
- sub_details.show().removeAttr('disabled');
- sub_dropdown.hide().attr('disabled', true );
- cancel_btn.hide();
- add_btn.show();
- }
+ const isDisabled = sub_dropdown.attr('disabled') === 'disabled';
+ sub_dropdown.toggle(!isDisabled).attr('disabled', isDisabled);
+ sub_details.toggle(isDisabled).attr('disabled', !isDisabled);
+ cancel_btn.toggle(!isDisabled);
+ add_btn.toggle(isDisabled);
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
showPackDropdown: function(e) { | |
e.preventDefault(); | |
var self = $(this), | |
wrap = self.parents('.wpuf-user-subscription'), | |
sub_dropdown = wrap.find('.wpuf-pack-dropdown'), | |
sub_details = wrap.find('.wpuf-user-sub-info'), | |
cancel_btn = wrap.find('.wpuf-cancel-pack'), | |
add_btn = wrap.find('.wpuf-add-pack'); | |
if ( sub_dropdown.attr( 'disabled' ) === 'disabled' ) { | |
sub_dropdown.show().removeAttr('disabled'); | |
sub_details.hide().attr('disabled', true ); | |
cancel_btn.show(); | |
add_btn.hide(); | |
} else { | |
sub_details.show().removeAttr('disabled'); | |
sub_dropdown.hide().attr('disabled', true ); | |
cancel_btn.hide(); | |
add_btn.show(); | |
} | |
showPackDropdown: function(e) { | |
e.preventDefault(); | |
var self = $(this), | |
wrap = self.parents('.wpuf-user-subscription'), | |
sub_dropdown = wrap.find('.wpuf-pack-dropdown'), | |
sub_details = wrap.find('.wpuf-user-sub-info'), | |
cancel_btn = wrap.find('.wpuf-cancel-pack'), | |
add_btn = wrap.find('.wpuf-add-pack'); | |
const isDisabled = sub_dropdown.attr('disabled') === 'disabled'; | |
sub_dropdown.toggle(!isDisabled).attr('disabled', isDisabled); | |
sub_details.toggle(isDisabled).attr('disabled', !isDisabled); | |
cancel_btn.toggle(!isDisabled); | |
add_btn.toggle(isDisabled); |
deletePack: function(e){ | ||
var self = $(this), | ||
wrap = self.parents('.wpuf-user-subscription'), | ||
sub_dropdown = wrap.find('.wpuf-pack-dropdown'), | ||
selected_sub = wrap.find( '#wpuf_sub_pack' ), | ||
userid = $(e.target).attr('data-userid'), | ||
packid = $(e.target).attr('data-packid'); | ||
|
||
wrap.find('.wpuf-delete-pack-btn').attr('disabled', true); | ||
wrap.css('opacity', 0.5); | ||
$.post( | ||
ajaxurl, | ||
{ | ||
'action' : 'wpuf_delete_user_package', | ||
'userid' : userid, | ||
'packid' : packid, | ||
'wpuf_subscription_delete_nonce': wpuf_subs_vars.wpuf_subscription_delete_nonce | ||
}, | ||
function(data){ | ||
if(data){ | ||
wrap.css( 'opacity', 1 ); | ||
$('.wpuf-user-sub-info').remove(); | ||
$(e.target).remove(); | ||
selected_sub.val(-1); | ||
sub_dropdown.show(); | ||
} | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for the AJAX request.
The deletePack
function should include error handling for the AJAX request to handle potential failures.
$.post(
ajaxurl,
{
'action' : 'wpuf_delete_user_package',
'userid' : userid,
'packid' : packid,
'wpuf_subscription_delete_nonce': wpuf_subs_vars.wpuf_subscription_delete_nonce
},
function(data){
if(data){
wrap.css( 'opacity', 1 );
$('.wpuf-user-sub-info').remove();
$(e.target).remove();
selected_sub.val(-1);
sub_dropdown.show();
}
}
+).fail(function() {
+ alert('Failed to delete the subscription pack. Please try again.');
+ wrap.css('opacity', 1);
+ wrap.find('.wpuf-delete-pack-btn').attr('disabled', false);
});
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
deletePack: function(e){ | |
var self = $(this), | |
wrap = self.parents('.wpuf-user-subscription'), | |
sub_dropdown = wrap.find('.wpuf-pack-dropdown'), | |
selected_sub = wrap.find( '#wpuf_sub_pack' ), | |
userid = $(e.target).attr('data-userid'), | |
packid = $(e.target).attr('data-packid'); | |
wrap.find('.wpuf-delete-pack-btn').attr('disabled', true); | |
wrap.css('opacity', 0.5); | |
$.post( | |
ajaxurl, | |
{ | |
'action' : 'wpuf_delete_user_package', | |
'userid' : userid, | |
'packid' : packid, | |
'wpuf_subscription_delete_nonce': wpuf_subs_vars.wpuf_subscription_delete_nonce | |
}, | |
function(data){ | |
if(data){ | |
wrap.css( 'opacity', 1 ); | |
$('.wpuf-user-sub-info').remove(); | |
$(e.target).remove(); | |
selected_sub.val(-1); | |
sub_dropdown.show(); | |
} | |
} | |
); | |
deletePack: function(e){ | |
var self = $(this), | |
wrap = self.parents('.wpuf-user-subscription'), | |
sub_dropdown = wrap.find('.wpuf-pack-dropdown'), | |
selected_sub = wrap.find( '#wpuf_sub_pack' ), | |
userid = $(e.target).attr('data-userid'), | |
packid = $(e.target).attr('data-packid'); | |
wrap.find('.wpuf-delete-pack-btn').attr('disabled', true); | |
wrap.css('opacity', 0.5); | |
$.post( | |
ajaxurl, | |
{ | |
'action' : 'wpuf_delete_user_package', | |
'userid' : userid, | |
'packid' : packid, | |
'wpuf_subscription_delete_nonce': wpuf_subs_vars.wpuf_subscription_delete_nonce | |
}, | |
function(data){ | |
if(data){ | |
wrap.css( 'opacity', 1 ); | |
$('.wpuf-user-sub-info').remove(); | |
$(e.target).remove(); | |
selected_sub.val(-1); | |
sub_dropdown.show(); | |
} | |
} | |
).fail(function() { | |
alert('Failed to delete the subscription pack. Please try again.'); | |
wrap.css('opacity', 1); | |
wrap.find('.wpuf-delete-pack-btn').attr('disabled', false); | |
}); |
couponCancel: function(e) { | ||
|
||
e.preventDefault(); | ||
|
||
var self = $(this), | ||
|
||
data = { | ||
|
||
action: 'wpuf_coupon_cancel', | ||
|
||
_wpnonce: wpuf_frontend.nonce, | ||
|
||
pack_id: self.data('pack_id') | ||
|
||
}, | ||
|
||
coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'); | ||
|
||
|
||
|
||
coupon_field.addClass('wpuf-coupon-field-spinner'); | ||
|
||
$.post( wpuf_frontend.ajaxurl, data, function( res ) { | ||
|
||
coupon_field.removeClass('wpuf-coupon-field-spinner'); | ||
|
||
if ( res.success ) { | ||
$('.wpuf-pack-inner' ).html( res.data.append_data ); | ||
$('.wpuf-coupon-id-field').val(''); | ||
|
||
var coupon_wrap = self.closest('.wpuf-copon-wrap'); | ||
|
||
coupon_wrap.hide(); | ||
coupon_wrap.siblings('.wpuf-copon-show').show(); | ||
|
||
$('.wpuf-subscription-success').html(''); | ||
$('.wpuf-subscription-error').html(''); | ||
} | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for the AJAX request.
The couponCancel
function should include error handling for the AJAX request to handle potential failures.
$.post( wpuf_frontend.ajaxurl, data, function( res ) {
coupon_field.removeClass('wpuf-coupon-field-spinner');
if ( res.success ) {
$('.wpuf-pack-inner' ).html( res.data.append_data );
$('.wpuf-coupon-id-field').val('');
var coupon_wrap = self.closest('.wpuf-copon-wrap');
coupon_wrap.hide();
coupon_wrap.siblings('.wpuf-copon-show').show();
$('.wpuf-subscription-success').html('');
$('.wpuf-subscription-error').html('');
}
+}).fail(function() {
+ alert('Failed to cancel the coupon. Please try again.');
+ coupon_field.removeClass('wpuf-coupon-field-spinner');
});
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
couponCancel: function(e) { | |
e.preventDefault(); | |
var self = $(this), | |
data = { | |
action: 'wpuf_coupon_cancel', | |
_wpnonce: wpuf_frontend.nonce, | |
pack_id: self.data('pack_id') | |
}, | |
coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'); | |
coupon_field.addClass('wpuf-coupon-field-spinner'); | |
$.post( wpuf_frontend.ajaxurl, data, function( res ) { | |
coupon_field.removeClass('wpuf-coupon-field-spinner'); | |
if ( res.success ) { | |
$('.wpuf-pack-inner' ).html( res.data.append_data ); | |
$('.wpuf-coupon-id-field').val(''); | |
var coupon_wrap = self.closest('.wpuf-copon-wrap'); | |
coupon_wrap.hide(); | |
coupon_wrap.siblings('.wpuf-copon-show').show(); | |
$('.wpuf-subscription-success').html(''); | |
$('.wpuf-subscription-error').html(''); | |
} | |
}); | |
couponCancel: function(e) { | |
e.preventDefault(); | |
var self = $(this), | |
data = { | |
action: 'wpuf_coupon_cancel', | |
_wpnonce: wpuf_frontend.nonce, | |
pack_id: self.data('pack_id') | |
}, | |
coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'); | |
coupon_field.addClass('wpuf-coupon-field-spinner'); | |
$.post( wpuf_frontend.ajaxurl, data, function( res ) { | |
coupon_field.removeClass('wpuf-coupon-field-spinner'); | |
if ( res.success ) { | |
$('.wpuf-pack-inner' ).html( res.data.append_data ); | |
$('.wpuf-coupon-id-field').val(''); | |
var coupon_wrap = self.closest('.wpuf-copon-wrap'); | |
coupon_wrap.hide(); | |
coupon_wrap.siblings('.wpuf-copon-show').show(); | |
$('.wpuf-subscription-success').html(''); | |
$('.wpuf-subscription-error').html(''); | |
} | |
}).fail(function() { | |
alert('Failed to cancel the coupon. Please try again.'); | |
coupon_field.removeClass('wpuf-coupon-field-spinner'); | |
}); |
init: function() { | ||
|
||
$('input#wpuf-recuring-pay').on('click', this.showSubscriptionRecurring ); | ||
|
||
$('input#wpuf-trial-status').on('click', this.showSubscriptionPack ); | ||
|
||
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-apply-coupon', this.couponApply ); | ||
|
||
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-show', this.couponShow ); | ||
|
||
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-cancel', this.couponCancel ); | ||
|
||
$('.wpuf-assing-pack-btn').on( 'click', this.showPackDropdown ); | ||
|
||
$('.wpuf-delete-pack-btn').on( 'click', this.deletePack ); | ||
|
||
$('.wpuf-disabled-link').click( this.packAlert ); | ||
|
||
//on change enable expiration check status | ||
this.changeExpirationFieldVisibility(':checkbox#wpuf-enable_post_expiration'); | ||
|
||
$('.wpuf-metabox-post_expiration').on('change',':checkbox#wpuf-enable_post_expiration',this.changeExpirationFieldVisibility); | ||
//on change expiration type drop down | ||
//this.setTimeExpiration('select#wpuf-expiration_time_type'); | ||
$('.wpuf-metabox-post_expiration').on('change','select#wpuf-expiration_time_type',this.setTimeExpiration); | ||
|
||
// warn the user before updating the package | ||
$( 'body.post-type-wpuf_subscription #post' ).submit( function( event ) { | ||
if ( document.activeElement.value === 'Update' ) { | ||
event.preventDefault(); | ||
Swal.fire({ | ||
title: 'Are you sure to update the subscription?', | ||
text: 'The changes you made will be applied only to the new subscriptions and pending recurring payments.', | ||
icon: 'warning', | ||
showCancelButton: true, | ||
confirmButtonColor: '#3085d6', | ||
cancelButtonColor: '#d33', | ||
confirmButtonText: 'Update' | ||
}).then((result) => { | ||
if (result.isConfirmed) { | ||
$( this ).unbind('submit').submit() | ||
} | ||
}); | ||
} | ||
} ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typographical errors in class names.
There are typographical errors in the class names used in the event handlers (e.g., wpuf-copon-show
should be wpuf-coupon-show
).
- $('input#wpuf-recuring-pay').on('click', this.showSubscriptionRecurring );
- $('input#wpuf-trial-status').on('click', this.showSubscriptionPack );
- $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-show', this.couponShow );
- $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-cancel', this.couponCancel );
+ $('input#wpuf-recurring-pay').on('click', this.showSubscriptionRecurring );
+ $('input#wpuf-trial-status').on('click', this.showSubscriptionPack );
+ $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-coupon-show', this.couponShow );
+ $('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-coupon-cancel', this.couponCancel );
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
init: function() { | |
$('input#wpuf-recuring-pay').on('click', this.showSubscriptionRecurring ); | |
$('input#wpuf-trial-status').on('click', this.showSubscriptionPack ); | |
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-apply-coupon', this.couponApply ); | |
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-show', this.couponShow ); | |
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-copon-cancel', this.couponCancel ); | |
$('.wpuf-assing-pack-btn').on( 'click', this.showPackDropdown ); | |
$('.wpuf-delete-pack-btn').on( 'click', this.deletePack ); | |
$('.wpuf-disabled-link').click( this.packAlert ); | |
//on change enable expiration check status | |
this.changeExpirationFieldVisibility(':checkbox#wpuf-enable_post_expiration'); | |
$('.wpuf-metabox-post_expiration').on('change',':checkbox#wpuf-enable_post_expiration',this.changeExpirationFieldVisibility); | |
//on change expiration type drop down | |
//this.setTimeExpiration('select#wpuf-expiration_time_type'); | |
$('.wpuf-metabox-post_expiration').on('change','select#wpuf-expiration_time_type',this.setTimeExpiration); | |
// warn the user before updating the package | |
$( 'body.post-type-wpuf_subscription #post' ).submit( function( event ) { | |
if ( document.activeElement.value === 'Update' ) { | |
event.preventDefault(); | |
Swal.fire({ | |
title: 'Are you sure to update the subscription?', | |
text: 'The changes you made will be applied only to the new subscriptions and pending recurring payments.', | |
icon: 'warning', | |
showCancelButton: true, | |
confirmButtonColor: '#3085d6', | |
cancelButtonColor: '#d33', | |
confirmButtonText: 'Update' | |
}).then((result) => { | |
if (result.isConfirmed) { | |
$( this ).unbind('submit').submit() | |
} | |
}); | |
} | |
} ); | |
init: function() { | |
$('input#wpuf-recurring-pay').on('click', this.showSubscriptionRecurring ); | |
$('input#wpuf-trial-status').on('click', this.showSubscriptionPack ); | |
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-apply-coupon', this.couponApply ); | |
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-coupon-show', this.couponShow ); | |
$('.wpuf-coupon-info-wrap').on( 'click','a.wpuf-coupon-cancel', this.couponCancel ); | |
$('.wpuf-assing-pack-btn').on( 'click', this.showPackDropdown ); | |
$('.wpuf-delete-pack-btn').on( 'click', this.deletePack ); | |
$('.wpuf-disabled-link').click( this.packAlert ); | |
//on change enable expiration check status | |
this.changeExpirationFieldVisibility(':checkbox#wpuf-enable_post_expiration'); | |
$('.wpuf-metabox-post_expiration').on('change',':checkbox#wpuf-enable_post_expiration',this.changeExpirationFieldVisibility); | |
//on change expiration type drop down | |
//this.setTimeExpiration('select#wpuf-expiration_time_type'); | |
$('.wpuf-metabox-post_expiration').on('change','select#wpuf-expiration_time_type',this.setTimeExpiration); | |
// warn the user before updating the package | |
$( 'body.post-type-wpuf_subscription #post' ).submit( function( event ) { | |
if ( document.activeElement.value === 'Update' ) { | |
event.preventDefault(); | |
Swal.fire({ | |
title: 'Are you sure to update the subscription?', | |
text: 'The changes you made will be applied only to the new subscriptions and pending recurring payments.', | |
icon: 'warning', | |
showCancelButton: true, | |
confirmButtonColor: '#3085d6', | |
cancelButtonColor: '#d33', | |
confirmButtonText: 'Update' | |
}).then((result) => { | |
if (result.isConfirmed) { | |
$( this ).unbind('submit').submit() | |
} | |
}); | |
} | |
} ); |
couponApply: function(e) { | ||
|
||
e.preventDefault(); | ||
|
||
var self = $(this), | ||
|
||
coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'), | ||
|
||
coupon = coupon_field.val(); | ||
|
||
if ( coupon === '' ) { | ||
|
||
$('.wpuf-subscription-error').html( wpuf_frontend.coupon_error ); | ||
return; | ||
|
||
} | ||
|
||
var data = { | ||
|
||
action: 'wpuf_coupon_apply', | ||
|
||
_wpnonce: wpuf_frontend.nonce, | ||
|
||
coupon: coupon, | ||
|
||
pack_id: self.data('pack_id') | ||
|
||
}; | ||
|
||
if ( self.attr('disabled') === 'disabled' ) { | ||
|
||
//return; | ||
|
||
} | ||
|
||
self.attr( 'disabled', true ); | ||
|
||
coupon_field.addClass('wpuf-coupon-field-spinner'); | ||
|
||
$.post( wpuf_frontend.ajaxurl, data, function( res ) { | ||
coupon_field.removeClass('wpuf-coupon-field-spinner'); | ||
|
||
if ( res.success ) { | ||
$('.wpuf-pack-inner' ).html( res.data.append_data ); | ||
$('.wpuf-coupon-id-field').val( res.data.coupon_id ); | ||
|
||
if ( res.data.amount <= 0 ) { | ||
$('.wpuf-nullamount-hide').hide(); | ||
} | ||
|
||
$('.wpuf-subscription-success').html(res.data.message); | ||
$('.wpuf-subscription-error').html(''); | ||
} else { | ||
$('.wpuf-subscription-success').html(''); | ||
$('.wpuf-subscription-error').html(res.data.message); | ||
} | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for the AJAX request.
The couponApply
function should include error handling for the AJAX request to handle potential failures.
$.post( wpuf_frontend.ajaxurl, data, function( res ) {
coupon_field.removeClass('wpuf-coupon-field-spinner');
if ( res.success ) {
$('.wpuf-pack-inner' ).html( res.data.append_data );
$('.wpuf-coupon-id-field').val( res.data.coupon_id );
if ( res.data.amount <= 0 ) {
$('.wpuf-nullamount-hide').hide();
}
$('.wpuf-subscription-success').html(res.data.message);
$('.wpuf-subscription-error').html('');
} else {
$('.wpuf-subscription-success').html('');
$('.wpuf-subscription-error').html(res.data.message);
}
+}).fail(function() {
+ alert('Failed to apply the coupon. Please try again.');
+ coupon_field.removeClass('wpuf-coupon-field-spinner');
+ self.attr('disabled', false);
});
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
couponApply: function(e) { | |
e.preventDefault(); | |
var self = $(this), | |
coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'), | |
coupon = coupon_field.val(); | |
if ( coupon === '' ) { | |
$('.wpuf-subscription-error').html( wpuf_frontend.coupon_error ); | |
return; | |
} | |
var data = { | |
action: 'wpuf_coupon_apply', | |
_wpnonce: wpuf_frontend.nonce, | |
coupon: coupon, | |
pack_id: self.data('pack_id') | |
}; | |
if ( self.attr('disabled') === 'disabled' ) { | |
//return; | |
} | |
self.attr( 'disabled', true ); | |
coupon_field.addClass('wpuf-coupon-field-spinner'); | |
$.post( wpuf_frontend.ajaxurl, data, function( res ) { | |
coupon_field.removeClass('wpuf-coupon-field-spinner'); | |
if ( res.success ) { | |
$('.wpuf-pack-inner' ).html( res.data.append_data ); | |
$('.wpuf-coupon-id-field').val( res.data.coupon_id ); | |
if ( res.data.amount <= 0 ) { | |
$('.wpuf-nullamount-hide').hide(); | |
} | |
$('.wpuf-subscription-success').html(res.data.message); | |
$('.wpuf-subscription-error').html(''); | |
} else { | |
$('.wpuf-subscription-success').html(''); | |
$('.wpuf-subscription-error').html(res.data.message); | |
} | |
}); | |
couponApply: function(e) { | |
e.preventDefault(); | |
var self = $(this), | |
coupon_field = self.parents('.wpuf-coupon-info-wrap').find('input.wpuf-coupon-field'), | |
coupon = coupon_field.val(); | |
if ( coupon === '' ) { | |
$('.wpuf-subscription-error').html( wpuf_frontend.coupon_error ); | |
return; | |
} | |
var data = { | |
action: 'wpuf_coupon_apply', | |
_wpnonce: wpuf_frontend.nonce, | |
coupon: coupon, | |
pack_id: self.data('pack_id') | |
}; | |
if ( self.attr('disabled') === 'disabled' ) { | |
//return; | |
} | |
self.attr( 'disabled', true ); | |
coupon_field.addClass('wpuf-coupon-field-spinner'); | |
$.post( wpuf_frontend.ajaxurl, data, function( res ) { | |
coupon_field.removeClass('wpuf-coupon-field-spinner'); | |
if ( res.success ) { | |
$('.wpuf-pack-inner' ).html( res.data.append_data ); | |
$('.wpuf-coupon-id-field').val( res.data.coupon_id ); | |
if ( res.data.amount <= 0 ) { | |
$('.wpuf-nullamount-hide').hide(); | |
} | |
$('.wpuf-subscription-success').html(res.data.message); | |
$('.wpuf-subscription-error').html(''); | |
} else { | |
$('.wpuf-subscription-success').html(''); | |
$('.wpuf-subscription-error').html(res.data.message); | |
} | |
}).fail(function() { | |
alert('Failed to apply the coupon. Please try again.'); | |
coupon_field.removeClass('wpuf-coupon-field-spinner'); | |
self.attr('disabled', false); | |
}); |
…tion_design_revamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- package.json (2 hunks)
- wpuf-functions.php (1 hunks)
- wpuf.php (1 hunks)
Additional comments not posted (7)
package.json (4)
10-11
: Verify Vite integration for development and build scripts.The addition of
"dev": "vite"
and"build": "vite build"
scripts indicates a transition to using Vite for development and production builds. Ensure that the project is correctly configured to use Vite, and verify that all necessary configuration files are in place.Verification successful
Vite integration is correctly configured.
The presence of
vite.config.mjs
and the correctly defined scripts inpackage.json
confirm that Vite is properly set up for development and build processes. No further action is needed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify Vite configuration files and scripts. # Test: Check for the presence of Vite configuration files. fd --type f --name 'vite.config.*' # Test: Ensure the scripts are correctly set up in package.json. rg --type json '"dev": "vite"' rg --type json '"build": "vite build"'Length of output: 432
Script:
#!/bin/bash # Description: Corrected script to verify Vite configuration files. # Corrected Test: Check for the presence of Vite configuration files using a pattern search. fd 'vite.config.*' --type fLength of output: 45
40-49
: Review Vue.js and related libraries integration.The addition of Vue.js and related libraries like
@heroicons/vue
,@vueform/multiselect
,vue-router
, andpinia
suggests a shift towards a Vue.js-based architecture. Ensure that the project is properly set up to use these libraries and that any existing code is compatible with Vue.js.
14-16
: Check Tailwind CSS and DaisyUI integration.The addition of
@tailwindcss/forms
,@vitejs/plugin-vue
, anddaisyui
suggests the integration of Tailwind CSS and DaisyUI for styling. Ensure that Tailwind CSS is properly configured and that the necessary setup for DaisyUI is completed.Verification successful
Tailwind CSS and DaisyUI integration verified successfully.
- The
tailwind.config.js
file is present, confirming Tailwind CSS is configured.- DaisyUI is required in the Tailwind configuration, indicating its integration.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify Tailwind CSS and DaisyUI setup. # Test: Check for Tailwind CSS configuration file. fd --type f --name 'tailwind.config.*' # Test: Check for DaisyUI usage in the project. rg --type javascript 'daisyui'Length of output: 357
Script:
#!/bin/bash # Corrected script to verify Tailwind CSS and DaisyUI setup. # Test: Check for Tailwind CSS configuration file. fd 'tailwind.config.*' --type f # Test: Check for DaisyUI usage in JavaScript files. rg 'daisyui' --glob '*.js'Length of output: 126
29-29
: Ensure compatibility ofgrunt-shell
.The replacement of
grunt-ssh
withgrunt-shell
indicates a change in how shell commands are managed. Verify that the tasks previously usinggrunt-ssh
are compatible withgrunt-shell
.Verification successful
Compatibility of
grunt-shell
confirmed.The
grunt-shell
task configuration in the Gruntfile is straightforward, running annpm run build
command. This setup is compatible with the intended use ofgrunt-shell
for executing shell commands. No issues found regarding compatibility with previousgrunt-ssh
tasks.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify grunt-shell usage and compatibility. # Test: Check for grunt-shell tasks in Gruntfile. fd --type f --name 'Gruntfile.*' --exec rg 'grunt-shell'Length of output: 307
Script:
#!/bin/bash # Corrected script to verify grunt-shell usage and compatibility. # Find Gruntfile and search for grunt-shell tasks. fd 'Gruntfile' --exec rg 'grunt-shell'Length of output: 77
Script:
#!/bin/bash # Search for tasks using grunt-shell in the Gruntfile to verify their configuration. fd 'Gruntfile' --exec rg 'shell:'Length of output: 86
Script:
#!/bin/bash # Extract the full configuration for shell tasks in the Gruntfile. fd 'Gruntfile' --exec rg -A 10 'shell: {'Length of output: 121
Script:
#!/bin/bash # Corrected script to extract the full configuration for shell tasks in the Gruntfile. fd 'Gruntfile' --exec rg -A 10 'shell: \{'Length of output: 345
wpuf.php (1)
175-175
: Confirm integration ofWeDevs\Wpuf\API
.The addition of
WeDevs\Wpuf\API
to the$this->container
array in theinstantiate
method suggests new API functionalities. Ensure that this API class is implemented correctly and that its integration does not introduce any conflicts or issues.wpuf-functions.php (2)
4778-4783
: Functionwpuf_remove_admin_notices
is well-implemented.The function effectively removes all admin notices from the dashboard by targeting the appropriate hooks.
4816-4818
: Functionwpuf_is_option_on
is well-implemented.The function efficiently checks if an option is activated by comparing it to 'on' or 'yes'.
function wpuf_load_headway_badge( $selector = '#wpuf-headway-icon' ) { | ||
?> | ||
<script> | ||
const selector = '<?php echo $selector; ?>'; | ||
const badgeCount = selector + ' ul li.headway-icon span#HW_badge_cont.HW_visible'; | ||
const HW_config = { | ||
selector: selector, | ||
account: 'JPqPQy' | ||
}; | ||
</script> | ||
|
||
<?php | ||
wp_enqueue_script( 'wpuf-headway' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider improving readability in wpuf_load_headway_badge
.
Using wp_localize_script
could improve readability by passing PHP variables to JavaScript more cleanly.
function wpuf_load_headway_badge( $selector = '#wpuf-headway-icon' ) {
wp_enqueue_script( 'wpuf-headway' );
wp_localize_script( 'wpuf-headway', 'HW_config', [
'selector' => $selector,
'account' => 'JPqPQy'
] );
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
includes/Free/Free_Loader.php (2)
1428-1446
: Fill in the@since
tag in the documentation.The
@since
tag in the docblock is currently set toWPUF_SINCE
. It should be replaced with the actual version number when this feature is introduced.- * @since WPUF_SINCE + * @since 3.7.0
1448-1476
: Fill in the@since
tag in the documentation.The
@since
tag in the docblock is currently set toWPUF_SINCE
. It should be replaced with the actual version number when this feature is introduced.- * @since WPUF_SINCE + * @since 3.7.0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
assets/js/subscriptions.min.js
is excluded by!**/*.min.js
Files selected for processing (3)
- assets/css/admin/subscriptions.min.css (1 hunks)
- assets/js/components/subscriptions/Subsection.vue (1 hunks)
- includes/Free/Free_Loader.php (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- assets/css/admin/subscriptions.min.css
- assets/js/components/subscriptions/Subsection.vue
…tion_design_revamp
details in pro
Summary by CodeRabbit
New Features
Subscriptions
,Edit
,List
, andNotice
.Bug Fixes
Chores
.gitignore
to exclude specific asset files from version control.