spree_cm_commissioner 2.0.0.pre.pre → 2.0.0.pre.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env.example +3 -0
- data/.github/workflows/test_and_build_gem.yml +2 -16
- data/.gitignore +1 -2
- data/Gemfile.lock +1 -32
- data/Rakefile +4 -33
- data/app/assets/images/cm-hangmeas-checkout_image.svg +63 -0
- data/app/assets/images/cm-hangmeas-failed.svg +56 -0
- data/app/assets/images/cm-hangmeas-loader.svg +50 -0
- data/app/assets/images/cm-hangmeas-success.svg +51 -0
- data/app/assets/images/mailer/mail.png +0 -0
- data/app/assets/images/mailer/tenant_phone.png +0 -0
- data/app/assets/images/mailer/tenant_user.png +0 -0
- data/app/assets/javascripts/spree_cm_commissioner/backend.js +1 -0
- data/app/assets/javascripts/spree_cm_commissioner/tenant_payment_icon_fields.js +65 -0
- data/app/assets/stylesheets/spree_cm_commissioner/backend/calendar.scss +11 -8
- data/app/assets/stylesheets/spree_cm_commissioner/backend/commissioner_admin.css.scss +1 -0
- data/app/assets/stylesheets/spree_cm_commissioner/backend/tenant_payment_icon_fields.scss +60 -0
- data/app/controllers/concerns/spree_cm_commissioner/content_cachable.rb +2 -1
- data/app/controllers/concerns/spree_cm_commissioner/transit/taxon_bitwise.rb +44 -0
- data/app/controllers/spree/admin/event_blazer_queries_controller.rb +11 -4
- data/app/controllers/spree/admin/stock_managements_controller.rb +1 -63
- data/app/controllers/spree/admin/tenants_controller.rb +8 -0
- data/app/controllers/spree/admin/trip_blazer_queries_controller.rb +35 -0
- data/app/controllers/spree/api/v2/operator/pie_chart_events_controller.rb +46 -0
- data/app/controllers/spree/api/v2/organizer/invite_crews_controller.rb +33 -0
- data/app/controllers/spree/api/v2/organizer/invite_guests_controller.rb +1 -1
- data/app/controllers/spree/api/v2/storefront/accommodations_controller.rb +31 -14
- data/app/controllers/spree/api/v2/storefront/dynamic_field_options_controller.rb +5 -1
- data/app/controllers/spree/api/v2/storefront/guests_controller.rb +30 -4
- data/app/controllers/spree/api/v2/storefront/queue_cart/line_items_controller.rb +2 -2
- data/app/controllers/spree/api/v2/tenant/checkout_controller.rb +2 -0
- data/app/controllers/spree_cm_commissioner/admin/variants_controller_decorator.rb +1 -1
- data/app/controllers/spree_cm_commissioner/api/v2/storefront/checkout_controller_decorator.rb +11 -0
- data/app/controllers/spree_cm_commissioner/well_known_controller.rb +31 -17
- data/app/factory/spree_cm_commissioner/invite_guest_claimed_telegram_message_factory.rb +24 -81
- data/app/finders/spree_cm_commissioner/line_items/find_by_variant_decorator.rb +20 -0
- data/app/interactors/spree_cm_commissioner/apple_app_site_association_fetcher.rb +27 -0
- data/app/interactors/spree_cm_commissioner/asset_links_fetcher.rb +27 -0
- data/app/interactors/spree_cm_commissioner/create_ticket.rb +6 -5
- data/app/interactors/spree_cm_commissioner/create_vendor.rb +44 -0
- data/app/interactors/spree_cm_commissioner/crew_invite_link_handler.rb +48 -0
- data/app/interactors/spree_cm_commissioner/pin_code_sender.rb +0 -1
- data/app/interactors/spree_cm_commissioner/sms.rb +1 -1
- data/app/interactors/spree_cm_commissioner/telegram_chats_auto_finder.rb +144 -0
- data/app/interactors/spree_cm_commissioner/user_id_token_authenticator.rb +7 -3
- data/app/interactors/spree_cm_commissioner/user_id_token_checker.rb +11 -3
- data/app/interactors/spree_cm_commissioner/user_identity_checker.rb +12 -6
- data/app/interactors/spree_cm_commissioner/user_registration_with_id_token.rb +7 -1
- data/app/interactors/spree_cm_commissioner/vattanac_bank_initiator.rb +5 -1
- data/app/jobs/spree_cm_commissioner/application_job.rb +0 -20
- data/app/jobs/spree_cm_commissioner/application_unique_job.rb +0 -20
- data/app/jobs/spree_cm_commissioner/sms_pin_code_job.rb +1 -1
- data/app/mailers/spree/order_mailer_decorator.rb +18 -3
- data/app/models/concerns/spree_cm_commissioner/event_check_in_flowable.rb +30 -0
- data/app/models/concerns/spree_cm_commissioner/line_item_durationable.rb +33 -9
- data/app/models/concerns/spree_cm_commissioner/option_type_attr_type.rb +13 -1
- data/app/models/concerns/spree_cm_commissioner/order_state_machine.rb +0 -39
- data/app/models/concerns/spree_cm_commissioner/product_delegation.rb +3 -1
- data/app/models/concerns/spree_cm_commissioner/product_type.rb +0 -10
- data/app/models/concerns/spree_cm_commissioner/taxon_kind.rb +1 -1
- data/app/models/concerns/spree_cm_commissioner/tenant_preference.rb +5 -0
- data/app/models/concerns/spree_cm_commissioner/variant_options_concern.rb +4 -2
- data/app/models/spree_cm_commissioner/blazer_queryable.rb +8 -0
- data/app/models/spree_cm_commissioner/branch.rb +12 -0
- data/app/models/spree_cm_commissioner/chart_type.rb +10 -0
- data/app/models/spree_cm_commissioner/crew_invite_link.rb +4 -0
- data/app/models/spree_cm_commissioner/dynamic_field.rb +37 -3
- data/app/models/spree_cm_commissioner/dynamic_field_option.rb +7 -1
- data/app/models/spree_cm_commissioner/guest.rb +57 -19
- data/app/models/spree_cm_commissioner/guest_dynamic_field.rb +61 -3
- data/app/models/spree_cm_commissioner/invite.rb +4 -6
- data/app/models/spree_cm_commissioner/invite_team.rb +3 -1
- data/app/models/spree_cm_commissioner/line_item_decorator.rb +78 -46
- data/app/models/spree_cm_commissioner/line_item_seat.rb +10 -0
- data/app/models/spree_cm_commissioner/notification_taxon.rb +1 -1
- data/app/models/spree_cm_commissioner/option_type_decorator.rb +11 -1
- data/app/models/spree_cm_commissioner/option_value_vehicle_type.rb +8 -0
- data/app/models/spree_cm_commissioner/order_decorator.rb +1 -30
- data/app/models/spree_cm_commissioner/pin_code.rb +3 -2
- data/app/models/spree_cm_commissioner/pin_code_telegram.rb +28 -0
- data/app/models/spree_cm_commissioner/place.rb +3 -1
- data/app/models/spree_cm_commissioner/product_decorator.rb +26 -10
- data/app/models/spree_cm_commissioner/promotion_category_decorator.rb +11 -0
- data/app/models/spree_cm_commissioner/service_calendar.rb +2 -0
- data/app/models/spree_cm_commissioner/state_decorator.rb +1 -0
- data/app/models/spree_cm_commissioner/stock/availability_checker.rb +25 -26
- data/app/models/spree_cm_commissioner/stock/availability_validator_decorator.rb +1 -2
- data/app/models/spree_cm_commissioner/stock/line_item_availability_checker.rb +3 -3
- data/app/models/spree_cm_commissioner/stock_item_decorator.rb +0 -17
- data/app/models/spree_cm_commissioner/stop.rb +23 -0
- data/app/models/spree_cm_commissioner/taxon_decorator.rb +6 -2
- data/app/models/spree_cm_commissioner/taxonomy_decorator.rb +6 -0
- data/app/models/spree_cm_commissioner/telegram_chat.rb +6 -0
- data/app/models/spree_cm_commissioner/trip.rb +10 -12
- data/app/models/spree_cm_commissioner/trip_connection.rb +5 -5
- data/app/models/spree_cm_commissioner/trip_stop.rb +3 -2
- data/app/models/spree_cm_commissioner/user_decorator.rb +6 -0
- data/app/models/spree_cm_commissioner/user_identity_provider.rb +26 -4
- data/app/models/spree_cm_commissioner/user_taxon.rb +1 -0
- data/app/models/spree_cm_commissioner/variant_decorator.rb +47 -36
- data/app/models/spree_cm_commissioner/variant_options.rb +23 -0
- data/app/models/spree_cm_commissioner/vehicle.rb +14 -9
- data/app/models/spree_cm_commissioner/vehicle_seat.rb +11 -0
- data/app/models/spree_cm_commissioner/vehicle_type.rb +76 -0
- data/app/models/spree_cm_commissioner/vendor_decorator.rb +13 -7
- data/app/models/spree_cm_commissioner/vendor_place.rb +5 -6
- data/app/models/spree_cm_commissioner/vendor_stop.rb +2 -1
- data/app/overrides/spree/admin/taxons/_form/check_in_flows.html.erb.deface +18 -0
- data/app/overrides/spree/admin/variants/_form/kyc_field.html.erb.deface +2 -2
- data/app/queries/spree_cm_commissioner/guest_searcher_query.rb +45 -3
- data/app/queries/spree_cm_commissioner/pie_chart_event_queries.rb +179 -0
- data/app/queries/spree_cm_commissioner/trip_query.rb +26 -23
- data/app/queries/spree_cm_commissioner/trip_search_query.rb +76 -0
- data/app/queries/spree_cm_commissioner/variant_availability/non_permanent_stock_query.rb +45 -0
- data/app/queries/spree_cm_commissioner/variant_availability/permanent_stock_query.rb +55 -0
- data/app/request_schemas/spree_cm_commissioner/accommodation_request_schema.rb +0 -3
- data/app/request_schemas/spree_cm_commissioner/application_request_schema.rb +1 -1
- data/app/serializables/spree_cm_commissioner/pie_chart_event.rb +11 -0
- data/app/serializers/spree/v2/organizer/invite_crews_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/accommodation_serializer.rb +0 -2
- data/app/serializers/spree/v2/storefront/line_item_serializer_decorator.rb +0 -1
- data/app/serializers/spree/v2/tenant/user_serializer.rb +1 -0
- data/app/serializers/spree_cm_commissioner/v2/operator/chart_type_serializer.rb +10 -0
- data/app/serializers/spree_cm_commissioner/v2/operator/dashboard_crew_event_serializer.rb +4 -1
- data/app/serializers/spree_cm_commissioner/v2/storefront/dynamic_field_option_serializer.rb +1 -3
- data/app/serializers/spree_cm_commissioner/v2/storefront/dynamic_field_serializer.rb +1 -3
- data/app/serializers/spree_cm_commissioner/v2/storefront/guest_dynamic_field_serializer.rb +2 -1
- data/app/services/spree_cm_commissioner/organizer/export_guest_csv_service.rb +23 -15
- data/app/services/spree_cm_commissioner/user_authenticator.rb +1 -1
- data/app/services/spree_cm_commissioner/vehicle_option_value_creator.rb +11 -0
- data/app/views/blazer/queries/_content.html.erb +8 -0
- data/app/views/spree/admin/stock_managements/_variant_stock_items.html.erb +2 -7
- data/app/views/spree/admin/stock_managements/index.html.erb +6 -55
- data/app/views/spree/admin/tenant_vendors/index.html.erb +9 -2
- data/app/views/spree/admin/tenants/_form.html.erb +118 -42
- data/app/views/spree/admin/tenants/edit.html.erb +2 -1
- data/app/views/spree/admin/tenants/index.html.erb +7 -1
- data/app/views/spree/admin/vendors/_form.html.erb +14 -0
- data/app/views/spree/order_mailer/confirm_email.html.erb +27 -16
- data/app/views/spree_cm_commissioner/layouts/order_mailer.html.erb +5 -1
- data/app/views/spree_cm_commissioner/order_mailer/_mailer_stylesheets.html.erb +41 -4
- data/app/views/spree_cm_commissioner/order_mailer/tenant/_customer_info.html.erb +42 -0
- data/app/views/spree_cm_commissioner/order_mailer/tenant/_footer.html.erb +25 -0
- data/app/views/spree_cm_commissioner/order_mailer/tenant/_greeting.html.erb +19 -0
- data/app/views/spree_cm_commissioner/order_mailer/tenant/_support_contact.html.erb +33 -0
- data/config/initializers/spree_permitted_attributes.rb +2 -5
- data/config/locales/en.yml +10 -1
- data/config/routes.rb +7 -22
- data/db/migrate/20240202080634_update_counter_cache_of_vehicle_type.rb +1 -3
- data/db/migrate/20250616084219_add_description_to_cm_vendor_place.rb +5 -0
- data/db/migrate/20250630103536_create_cm_telegram_chats.rb +13 -0
- data/db/migrate/20250701093203_add_configurations_to_cm_dynamic_field.rb +6 -0
- data/db/migrate/20250702091305_add_dynamic_field_option_to_guest_dynamic_field.rb +5 -0
- data/db/migrate/20250702091935_add_status_to_dynamic_field_option.rb +5 -0
- data/db/migrate/20250707032008_add_vendor_id_to_spree_category.rb +7 -0
- data/db/migrate/20250709073455_add_email_fields_to_spree_vendors.rb +6 -0
- data/db/migrate/20250711092937_add_position_to_cm_dynamic_fields.rb +11 -0
- data/db/migrate/20250711093045_add_position_to_cm_dynamic_field_options.rb +11 -0
- data/db/migrate/20250714121508_rename_cm_taxon_blazer_query_to_blazer_queryables.rb +7 -0
- data/db/migrate/20250714124323_make_cm_blazer_queryables_polymorphic.rb +19 -0
- data/db/migrate/20250715103333_remove_indexes_from_cm_user_identity_providers.rb +13 -0
- data/db/migrate/20250718071620_add_data_fill_stage_to_dynamic_fields.rb +5 -0
- data/docker-compose.yml +1 -1
- data/lib/cm_app_logger.rb +4 -11
- data/lib/generators/spree_cm_commissioner/install/install_generator.rb +11 -14
- data/lib/generators/spree_cm_commissioner/install/templates/app/javascript/{spree_dashboard/spree_cm_commissioner → spree_cm_commissioner}/utilities.js +0 -4
- data/lib/spree_cm_commissioner/calendar_event.rb +1 -11
- data/lib/spree_cm_commissioner/test_helper/factories/branch_factory.rb +12 -0
- data/lib/spree_cm_commissioner/test_helper/factories/departure_time_option_type_factory.rb +8 -0
- data/lib/spree_cm_commissioner/test_helper/factories/duration_option_type_factory.rb +8 -0
- data/lib/spree_cm_commissioner/test_helper/factories/guest_factory.rb +0 -10
- data/lib/spree_cm_commissioner/test_helper/factories/homepage_section_relatable_factory.rb +1 -1
- data/lib/spree_cm_commissioner/test_helper/factories/line_item_factory.rb +1 -1
- data/lib/spree_cm_commissioner/test_helper/factories/line_item_seat_factory.rb +7 -0
- data/lib/spree_cm_commissioner/test_helper/factories/option_type_factory.rb +30 -6
- data/lib/spree_cm_commissioner/test_helper/factories/order_factory.rb +36 -0
- data/lib/spree_cm_commissioner/test_helper/factories/product_factory.rb +34 -18
- data/lib/spree_cm_commissioner/test_helper/factories/stock_location_factory.rb +2 -2
- data/lib/spree_cm_commissioner/test_helper/factories/stop_factory.rb +14 -0
- data/lib/spree_cm_commissioner/test_helper/factories/transit_place_factory.rb +8 -0
- data/lib/spree_cm_commissioner/test_helper/factories/trip_factory.rb +3 -10
- data/lib/spree_cm_commissioner/test_helper/factories/user_identity_provider_factory.rb +1 -1
- data/lib/spree_cm_commissioner/test_helper/factories/variant_factory.rb +19 -41
- data/lib/spree_cm_commissioner/test_helper/factories/vehicle_factory.rb +1 -1
- data/lib/spree_cm_commissioner/test_helper/factories/vehicle_option_type_factory.rb +8 -0
- data/lib/spree_cm_commissioner/test_helper/factories/vehicle_type_factory.rb +96 -0
- data/lib/spree_cm_commissioner/test_helper/factories/vendor_factory.rb +1 -1
- data/lib/spree_cm_commissioner/trip_seat_layout_result.rb +11 -0
- data/lib/spree_cm_commissioner/version.rb +1 -1
- data/lib/spree_cm_commissioner.rb +1 -35
- data/spree_cm_commissioner.gemspec +0 -7
- metadata +70 -133
- data/app/controllers/spree/admin/inventory_items_controller.rb +0 -83
- data/app/controllers/spree/api/v2/storefront/accommodations/variants_controller.rb +0 -42
- data/app/finders/spree_cm_commissioner/accommodations/find.rb +0 -37
- data/app/finders/spree_cm_commissioner/accommodations/find_variant.rb +0 -32
- data/app/interactors/spree_cm_commissioner/ensure_correct_product_type.rb +0 -40
- data/app/interactors/spree_cm_commissioner/inventory_item_syncer.rb +0 -25
- data/app/interactors/spree_cm_commissioner/stock/inventory_item_resetter.rb +0 -44
- data/app/interactors/spree_cm_commissioner/stock/inventory_items_adjuster.rb +0 -13
- data/app/interactors/spree_cm_commissioner/stock/inventory_items_generator.rb +0 -15
- data/app/interactors/spree_cm_commissioner/stock/permanent_inventory_items_generator.rb +0 -75
- data/app/interactors/spree_cm_commissioner/stock/stock_movement_creator.rb +0 -32
- data/app/jobs/spree_cm_commissioner/ensure_correct_product_type_job.rb +0 -7
- data/app/jobs/spree_cm_commissioner/inventory_item_syncer_job.rb +0 -7
- data/app/jobs/spree_cm_commissioner/stock/inventory_items_adjuster_job.rb +0 -11
- data/app/jobs/spree_cm_commissioner/stock/inventory_items_generator_job.rb +0 -11
- data/app/jobs/spree_cm_commissioner/stock/permanent_inventory_items_generator_job.rb +0 -9
- data/app/models/concerns/spree_cm_commissioner/order_seatable.rb +0 -44
- data/app/models/spree_cm_commissioner/block.rb +0 -23
- data/app/models/spree_cm_commissioner/inventory.rb +0 -11
- data/app/models/spree_cm_commissioner/inventory_item.rb +0 -69
- data/app/models/spree_cm_commissioner/price_decorator.rb +0 -9
- data/app/models/spree_cm_commissioner/redis_stock/cached_inventory_items_builder.rb +0 -41
- data/app/models/spree_cm_commissioner/redis_stock/inventory_updater.rb +0 -126
- data/app/models/spree_cm_commissioner/redis_stock/line_items_cached_inventory_items_builder.rb +0 -36
- data/app/models/spree_cm_commissioner/redis_stock/variant_cached_inventory_items_builder.rb +0 -25
- data/app/models/spree_cm_commissioner/reserved_block.rb +0 -30
- data/app/models/spree_cm_commissioner/seat_layout.rb +0 -20
- data/app/models/spree_cm_commissioner/seat_section.rb +0 -16
- data/app/models/spree_cm_commissioner/seats/blocks_canceler.rb +0 -30
- data/app/models/spree_cm_commissioner/seats/blocks_holder.rb +0 -53
- data/app/models/spree_cm_commissioner/seats/blocks_reserver.rb +0 -49
- data/app/models/spree_cm_commissioner/seats/errors/blocks_are_on_hold_by_other_guest.rb +0 -4
- data/app/models/spree_cm_commissioner/seats/errors/blocks_are_reserved_by_other_guest.rb +0 -4
- data/app/models/spree_cm_commissioner/seats/errors/blocks_are_reserved_by_same_guest.rb +0 -4
- data/app/models/spree_cm_commissioner/seats/errors/unable_to_save_reserved_block_record.rb +0 -4
- data/app/models/spree_cm_commissioner/stock/order_availability_checker.rb +0 -44
- data/app/models/spree_cm_commissioner/taxon_blazer_query.rb +0 -8
- data/app/models/spree_cm_commissioner/variant_block.rb +0 -9
- data/app/request_schemas/spree_cm_commissioner/variant_request_schema.rb +0 -19
- data/app/views/spree/admin/inventory_items/show.html.erb +0 -72
- data/app/views/spree/admin/stock_managements/calendar.html.erb +0 -56
- data/config/initializers/paper_trail.rb +0 -1
- data/db/migrate/20250304293518_create_cm_inventory_items.rb +0 -21
- data/db/migrate/20250429094228_add_lock_version_to_cm_inventory_items.rb +0 -5
- data/db/migrate/20250502025848_add_index_to_spree_products.rb +0 -5
- data/db/migrate/20250502030001_add_product_type_to_spree_variants.rb +0 -5
- data/db/migrate/20250502030002_add_product_type_to_spree_line_items.rb +0 -5
- data/db/migrate/20250603035256_add_inventory_item_to_spree_prices.rb +0 -7
- data/db/migrate/20250619073724_drop_table_cm_line_item_seats.rb +0 -5
- data/db/migrate/20250619073812_drop_table_cm_vehicle_seats.rb +0 -5
- data/db/migrate/20250619073844_drop_table_cm_vehicle_types.rb +0 -9
- data/db/migrate/20250619073957_drop_table_cm_option_value_vehicle_types.rb +0 -5
- data/db/migrate/20250619082354_remove_unnecessary_fields_from_cm_places.rb +0 -9
- data/db/migrate/20250619082736_remove_route_type_from_spree_products.rb +0 -5
- data/db/migrate/20250619083055_remove_unnecessary_fields_from_spree_taxons.rb +0 -5
- data/db/migrate/20250620083055_remove_variant_id_from_cm_trips.rb +0 -5
- data/db/migrate/20250620090000_update_cm_trip_connections_to_use_cm_trips.rb +0 -6
- data/db/migrate/20250620090001_create_cm_seat_layouts.rb +0 -17
- data/db/migrate/20250620090002_create_cm_seat_sections.rb +0 -18
- data/db/migrate/20250620090003_create_cm_blocks.rb +0 -18
- data/db/migrate/20250624091005_create_cm_reserved_blocks.rb +0 -29
- data/db/migrate/20250626083642_create_cm_variant_blocks.rb +0 -24
- data/db/migrate/20250627023314_add_block_id_to_cm_guests.rb +0 -13
- data/lib/spree_cm_commissioner/cached_inventory_item.rb +0 -23
- data/lib/spree_cm_commissioner/test_helper/factories/block_factory.rb +0 -9
- data/lib/spree_cm_commissioner/test_helper/factories/inventory_item_factory.rb +0 -9
- data/lib/spree_cm_commissioner/test_helper/factories/reserved_block_factory.rb +0 -27
- data/lib/spree_cm_commissioner/test_helper/factories/seat_layout_factory.rb +0 -8
- data/lib/spree_cm_commissioner/test_helper/factories/seat_section_factory.rb +0 -8
- data/lib/spree_cm_commissioner/test_helper/factories/trip_connection_factory.rb +0 -6
- data/lib/spree_cm_commissioner/test_helper/factories/variant_block_factory.rb +0 -7
- data/lib/tasks/create_default_non_permanent_inventory_items.rake +0 -16
- data/lib/tasks/ensure_correct_product_type.rake +0 -7
- data/lib/tasks/generate_inventory_items.rake +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b85b4b7a446688bc4aed2974e7150a9155a2d919b998188fc7e575ccea0d2714
|
4
|
+
data.tar.gz: 134a3e165301c382a7e48016e768755420d32003a31cf3b3dac79f33b7a0d5a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd91cb46cb05faec83d0978df8312e272265ad03d1d14c1319ea0303081521dac9468a4e9e6fd4e72698e61c175fcddfc3bed53527e7f0ebe1a23f81062bf9c3
|
7
|
+
data.tar.gz: 1d04b75c972c6cff71fa6e95ca3882411a8a54b6b0b226183369a97b1360fa00c2c334e728203f647405313da8deec7298e4662dedfb068cc51540e4caf548d7
|
data/.env.example
CHANGED
@@ -10,7 +10,6 @@ on:
|
|
10
10
|
- reopened
|
11
11
|
branches:
|
12
12
|
- develop
|
13
|
-
- milestone-77-scalable-design
|
14
13
|
push:
|
15
14
|
tags:
|
16
15
|
- "*"
|
@@ -38,8 +37,7 @@ jobs:
|
|
38
37
|
console.log("PR title format is correct.");
|
39
38
|
}
|
40
39
|
- name: Check commit messages format
|
41
|
-
|
42
|
-
if: github.event_name == 'pull_request' && github.head_ref != 'milestone-77-scalable-design'
|
40
|
+
if: github.event_name == 'pull_request'
|
43
41
|
uses: actions/github-script@v7
|
44
42
|
with:
|
45
43
|
script: |
|
@@ -138,17 +136,6 @@ jobs:
|
|
138
136
|
--health-timeout 5s
|
139
137
|
--health-retries 5
|
140
138
|
|
141
|
-
redis:
|
142
|
-
image: redis
|
143
|
-
# Set health checks to wait until redis has started
|
144
|
-
options: >-
|
145
|
-
--health-cmd "redis-cli ping"
|
146
|
-
--health-interval 10s
|
147
|
-
--health-timeout 5s
|
148
|
-
--health-retries 5
|
149
|
-
ports:
|
150
|
-
- 6379:6379 # Maps port 6379 on service container to the host
|
151
|
-
|
152
139
|
steps:
|
153
140
|
- uses: actions/checkout@v3
|
154
141
|
|
@@ -184,9 +171,8 @@ jobs:
|
|
184
171
|
- name: Run test
|
185
172
|
env:
|
186
173
|
DATABASE_URL: postgres://myuser:mypassword@localhost:5432/test_db
|
187
|
-
REDIS_URL: redis://localhost:6379/0
|
188
174
|
|
189
|
-
if: github.event_name == 'pull_request'
|
175
|
+
if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop'
|
190
176
|
run: |
|
191
177
|
bundle exec rake
|
192
178
|
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -34,7 +34,7 @@ GIT
|
|
34
34
|
PATH
|
35
35
|
remote: .
|
36
36
|
specs:
|
37
|
-
spree_cm_commissioner (2.0.0.pre.
|
37
|
+
spree_cm_commissioner (2.0.0.pre.pre1)
|
38
38
|
activerecord-multi-tenant
|
39
39
|
activerecord_json_validator (~> 2.1, >= 2.1.3)
|
40
40
|
aws-sdk-cloudfront
|
@@ -42,7 +42,6 @@ PATH
|
|
42
42
|
aws-sdk-s3
|
43
43
|
blazer (~> 3.0.4)
|
44
44
|
byebug
|
45
|
-
connection_pool
|
46
45
|
counter_culture (~> 3.2)
|
47
46
|
dry-validation (~> 1.10)
|
48
47
|
elasticsearch (~> 8.5)
|
@@ -55,12 +54,9 @@ PATH
|
|
55
54
|
interactor (~> 3.1)
|
56
55
|
jwt (>= 2.5.0)
|
57
56
|
noticed (~> 1.6)
|
58
|
-
paper_trail (~> 16.0)
|
59
57
|
phonelib
|
60
58
|
premailer-rails
|
61
59
|
rails (~> 7.0.4)
|
62
|
-
redis
|
63
|
-
redis-rails
|
64
60
|
rqrcode (~> 2.0)
|
65
61
|
searchkick (~> 5.1)
|
66
62
|
simple_calendar (~> 2.4)
|
@@ -576,10 +572,6 @@ GEM
|
|
576
572
|
nokogiri (1.15.4)
|
577
573
|
mini_portile2 (~> 2.8.2)
|
578
574
|
racc (~> 1.4)
|
579
|
-
nokogiri (1.15.4-x86_64-darwin)
|
580
|
-
racc (~> 1.4)
|
581
|
-
nokogiri (1.15.4-x86_64-linux)
|
582
|
-
racc (~> 1.4)
|
583
575
|
noticed (1.6.3)
|
584
576
|
http (>= 4.0.0)
|
585
577
|
rails (>= 5.2.0)
|
@@ -588,9 +580,6 @@ GEM
|
|
588
580
|
sawyer (~> 0.9)
|
589
581
|
orm_adapter (0.5.0)
|
590
582
|
os (1.1.4)
|
591
|
-
paper_trail (16.0.0)
|
592
|
-
activerecord (>= 6.1)
|
593
|
-
request_store (~> 1.4)
|
594
583
|
parallel (1.23.0)
|
595
584
|
paranoia (2.6.3)
|
596
585
|
activerecord (>= 5.1, < 7.2)
|
@@ -626,8 +615,6 @@ GEM
|
|
626
615
|
activesupport (>= 2.3.14)
|
627
616
|
racc (1.7.1)
|
628
617
|
rack (2.2.8)
|
629
|
-
rack-session (1.0.2)
|
630
|
-
rack (< 3)
|
631
618
|
rack-test (2.1.0)
|
632
619
|
rack (>= 1.3)
|
633
620
|
rails (7.0.8)
|
@@ -671,31 +658,13 @@ GEM
|
|
671
658
|
rbtree (0.4.6)
|
672
659
|
redis (5.0.7)
|
673
660
|
redis-client (>= 0.9.0)
|
674
|
-
redis-actionpack (5.5.0)
|
675
|
-
actionpack (>= 5)
|
676
|
-
redis-rack (>= 2.1.0, < 4)
|
677
|
-
redis-store (>= 1.1.0, < 2)
|
678
|
-
redis-activesupport (5.3.0)
|
679
|
-
activesupport (>= 3, < 8)
|
680
|
-
redis-store (>= 1.3, < 2)
|
681
661
|
redis-client (0.17.0)
|
682
662
|
connection_pool
|
683
|
-
redis-rack (3.0.0)
|
684
|
-
rack-session (>= 0.2.0)
|
685
|
-
redis-store (>= 1.2, < 2)
|
686
|
-
redis-rails (5.0.2)
|
687
|
-
redis-actionpack (>= 5.0, < 6)
|
688
|
-
redis-activesupport (>= 5.0, < 6)
|
689
|
-
redis-store (>= 1.2, < 2)
|
690
|
-
redis-store (1.11.0)
|
691
|
-
redis (>= 4, < 6)
|
692
663
|
regexp_parser (2.8.2)
|
693
664
|
representable (3.2.0)
|
694
665
|
declarative (< 0.1.0)
|
695
666
|
trailblazer-option (>= 0.1.1, < 0.2.0)
|
696
667
|
uber (< 0.2.0)
|
697
|
-
request_store (1.7.0)
|
698
|
-
rack (>= 1.4)
|
699
668
|
responders (3.1.1)
|
700
669
|
actionpack (>= 5.2)
|
701
670
|
railties (>= 5.2)
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'bundler'
|
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
4
|
require 'rspec/core/rake_task'
|
5
|
-
require 'spree/testing_support/
|
5
|
+
require 'spree/testing_support/extension_rake'
|
6
6
|
|
7
7
|
RSpec::Core::RakeTask.new
|
8
8
|
|
@@ -14,37 +14,8 @@ task :default do
|
|
14
14
|
Rake::Task[:spec].invoke
|
15
15
|
end
|
16
16
|
|
17
|
-
# Copied from:
|
18
|
-
# spree_core:lib/spree/testing_support/common_rake.rb
|
19
|
-
# But refactored to skip frontend & backend setup.
|
20
17
|
desc 'Generates a dummy app for testing'
|
21
|
-
task :test_app do
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Rails.env = ENV['RAILS_ENV'] = 'test'
|
26
|
-
|
27
|
-
Spree::DummyGeneratorHelper.inject_extension_requirements = true
|
28
|
-
Spree::DummyGenerator.start ["--lib_name=spree_cm_commissioner", '--quiet']
|
29
|
-
Spree::InstallGenerator.start [
|
30
|
-
"--lib_name=spree_cm_commissioner",
|
31
|
-
'--auto-accept',
|
32
|
-
'--migrate=false',
|
33
|
-
'--seed=false',
|
34
|
-
'--sample=false',
|
35
|
-
'--quiet',
|
36
|
-
'--copy_storefront=false',
|
37
|
-
"--install_storefront=false",
|
38
|
-
"--install_admin=false",
|
39
|
-
"--user_class=Spree::User"
|
40
|
-
]
|
41
|
-
|
42
|
-
puts 'Setting up dummy database...'
|
43
|
-
system('bin/rails db:environment:set RAILS_ENV=test')
|
44
|
-
system('bundle exec rake db:drop db:create')
|
45
|
-
Spree::DummyModelGenerator.start
|
46
|
-
system('bundle exec rake db:migrate')
|
47
|
-
|
48
|
-
puts 'Running extension installation generator...'
|
49
|
-
SpreeCmCommissioner::Generators::InstallGenerator.start(['--auto-run-migrations'])
|
18
|
+
task :test_app do
|
19
|
+
ENV['LIB_NAME'] = 'spree_cm_commissioner'
|
20
|
+
Rake::Task['extension:test_app'].invoke
|
50
21
|
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg id="payment_proccessing" data-name="payment proccessing" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 334 200">
|
3
|
+
<defs>
|
4
|
+
<clipPath id="clippath">
|
5
|
+
<path d="m332.72,16.62v166.75c0,8.27-6.28,15.08-14.33,15.92-.55.05-1.11.08-1.67.08H16c-.48,0-.96-.02-1.43-.06-8.17-.73-14.57-7.59-14.57-15.94V16.62C0,7.78,7.16.62,16,.62h300.72c8.84,0,16,7.16,16,16Z" style="fill: none;"/>
|
6
|
+
</clipPath>
|
7
|
+
</defs>
|
8
|
+
<g style="clip-path: url(#clippath);">
|
9
|
+
<path d="m332.72,16.62v166.75c0,8.27-6.28,15.08-14.33,15.92-.55.05-1.11.08-1.67.08H16c-.48,0-.96-.02-1.43-.06-8.17-.73-14.57-7.59-14.57-15.94V16.62C0,7.78,7.16.62,16,.62h300.72c8.84,0,16,7.16,16,16Z" style="fill: #130d07;"/>
|
10
|
+
<path d="m160.11,89.69c1.41-5.81-3.61-9.74-10.21-9.27-6.6.47-26.31,10.68-28.51,12.26-2.2,1.57-29.54,6.6-34.25,3.77-4.71-2.83-12.46-7.49-12.46-7.49,0,0-23.81-23.81-40.47,2.86-16.67,26.66-13.99,61.42-13.99,61.42l-24.1,29.05s-10.95,10,3.81,19.05,22.11,18.14,31.15,21.3c9.04,3.16,14.46-7,14.46-7.68,0-.68,19.43-30.27,19.43-30.27,10.27-.69,20.53-1.41,30.79-2.17,10.81-.8,24.65.44,31.99-9.08,3.2-4.15,1.59-8.37-.02-12.85.06.18,3.68-1,4-1.13,1.81-.72,3.12-1.91,3.94-3.7,1.55-3.36,2.03-8.12.07-11.41-2.91-4.88-3.85-5.31-3.85-5.31.93.42,4.7-2.76,5.32-3.27,2.69-2.21,4.81-5.03,5.27-8.57,1.31-10.16-10.01-17.26-18.56-19.27,5.59,1.31,10.8,2.15,16.21-.39,3.01-1.41,5.69-3.43,8.35-5.44,4.02-3.03,10.38-7.18,11.65-12.41" style="fill: #e89875;"/>
|
11
|
+
<path d="m138.73,45.68c-1.83-.91-5.84-1.99-7.86-2.27-3.17-.44-12.78-.68-12.78-.68l-1.24,3.76-31.45-1.3c-4.73-.2-8.98,2.88-10.27,7.44l-27.87,101.59c-1.74,6.14,2.5,12.35,8.85,12.97l49.44,1.78c4.98.49,9.59-2.69,10.89-7.53l27.25-101.35c.17-.64.26-1.28.31-1.92,0-.02.01-.05.02-.07,1.59-7.52-1.35-10.47-5.29-12.43Z" style="fill: #302b31;"/>
|
12
|
+
<path d="m51.51,163.26l49.44,1.78c4.98.49,9.59-2.69,10.89-7.53l27.25-101.35c1.7-6.33-2.91-12.61-9.46-12.88l-48.82-2.02c-4.73-.2-8.98,2.88-10.27,7.44l-27.87,101.59c-1.74,6.14,2.5,12.35,8.85,12.97Z" style="fill: #212028;"/>
|
13
|
+
<path d="m108.45,126.85c-1.64.07-3.43-.23-5.08-.3-4.13-.18-8.26-.36-12.39-.54l-22.43-.98-.81-.04c-2.87-.41-4.61-1.99-3.7-4.96l.84-3.54c.55-2.49,2.89-4.15,5.42-3.86,13.54.41,27.15.41,40.66,1.23,2,.12,4.17.45,4.34,2.96.15,2.13-1.09,4.94-1.91,6.87-1.02,2.41-2.87,3.07-4.95,3.16Z" style="fill: #f59b1d;"/>
|
14
|
+
<path d="m117.78,96.1l-48.7-1.94c-2.03-.08-3.25-1.77-2.74-3.76l8.36-32.34c.52-2,2.58-3.55,4.61-3.47l48.7,1.94c2.03.08,3.25,1.77,2.74,3.76l-8.36,32.34c-.52,2-2.58,3.55-4.61,3.47Z" style="fill: #fffaf8;"/>
|
15
|
+
<path d="m85.83,77.72l-8.87-.35c-.88-.04-1.41-.77-1.19-1.63l1.23-4.78c.22-.87,1.12-1.54,2-1.51l8.87.35c.88.04,1.41.77,1.19,1.63l-1.23,4.78c-.22.87-1.12,1.54-2,1.51Z" style="fill: #d6d6d6;"/>
|
16
|
+
<path d="m124.55,64.16l-9.8-.39c-.62-.02-1-.54-.84-1.15l.45-1.74c.16-.61.79-1.09,1.41-1.06l9.8.39c.62.02,1,.54.84,1.15l-.45,1.74c-.16.61-.79,1.09-1.41,1.06Z" style="fill: #d6d6d6;"/>
|
17
|
+
<path d="m84.05,81.98l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
18
|
+
<path d="m99.83,91.71l-27.44-1.09c-.25-.01-.41-.22-.34-.47l.42-1.62c.06-.25.32-.44.57-.43l27.44,1.09c.25.01.41.22.34.47l-.42,1.62c-.06.25-.32.44-.57.43Z" style="fill: #d6d6d6;"/>
|
19
|
+
<path d="m95.54,82.43l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
20
|
+
<path d="m107.03,82.89l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
21
|
+
<path d="m118.52,83.35l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
22
|
+
<path d="m111.65,93.7c-.49.15-.94.45-1.44.61-2.03.64-4.12-.62-4.15-2.53-.02-1.28.45-2.44,1.6-3.42.84-.72,1.78-1.08,2.78-1.14.88-.05,1.65.12,2.24.65.12.11.29.16.44.24-.17.19.02.23.08.32.37.57.57,1.21.45,1.96-.2,1.22-.73,2.32-1.89,3.17-.05.03-.08.09-.11.14Z" style="fill: #d6d6d6;"/>
|
23
|
+
<path d="m111.65,93.7s.07-.11.11-.14c1.16-.85,1.69-1.95,1.89-3.17.12-.75-.08-1.39-.45-1.96-.06-.09-.25-.14-.08-.32.59-.27,1.16-.59,1.79-.67,2.25-.26,3.6.86,3.66,2.68.06,1.96-1.32,3.73-3.42,4.37-1.29.39-2.36.14-3.23-.58-.09-.07-.18-.15-.26-.22Z" style="fill: #5e5e5e;"/>
|
24
|
+
<path d="m53.69,110.12s1.51-5.75,5.56,2.51c4.05,8.27,15.38,11.23,20.41,6.86s-.79-23.41-15.54-36.21c-14.75-12.8-30.48,5.41-37.12,19.9-6.65,14.49-6.78,50.07-6.78,50.07l48.9,21.12s8.3-15.25.02-34.98c-4.68-11.15-9.08-16.86-12.8-21.88-3.73-5.02-2.64-7.37-2.64-7.37Z" style="fill: #e89875;"/>
|
25
|
+
<g>
|
26
|
+
<rect x="222.73" y="98.72" width="8.27" height="27.35" style="fill: #fbc01a;"/>
|
27
|
+
<polygon points="231 100.13 222.73 100.13 221.53 95.4 232.39 95.4 231 100.13" style="fill: #fbc01a;"/>
|
28
|
+
<line x1="223.67" y1="100.13" x2="231" y2="100.13" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
29
|
+
<polygon points="222.73 126.08 231 126.08 232.2 130.8 221.33 130.8 222.73 126.08" style="fill: #fbc01a;"/>
|
30
|
+
<line x1="231" y1="126.08" x2="222.73" y2="126.08" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
31
|
+
</g>
|
32
|
+
<g>
|
33
|
+
<rect x="240.34" y="98.72" width="8.27" height="27.35" style="fill: #f4b200;"/>
|
34
|
+
<polygon points="248.61 100.13 240.34 100.13 239.15 95.4 250.01 95.4 248.61 100.13" style="fill: #f4b200;"/>
|
35
|
+
<polygon points="240.35 126.08 248.62 126.08 249.81 130.8 238.95 130.8 240.35 126.08" style="fill: #f4b200;"/>
|
36
|
+
</g>
|
37
|
+
<g>
|
38
|
+
<rect x="257.95" y="98.72" width="8.27" height="27.35" style="fill: #fbc01a;"/>
|
39
|
+
<polygon points="266.22 100.13 257.95 100.13 256.76 95.4 267.62 95.4 266.22 100.13" style="fill: #fbc01a;"/>
|
40
|
+
<line x1="258.9" y1="100.13" x2="266.22" y2="100.13" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
41
|
+
<polygon points="257.96 126.08 266.23 126.08 267.42 130.8 256.56 130.8 257.96 126.08" style="fill: #fbc01a;"/>
|
42
|
+
<line x1="266.22" y1="126.08" x2="257.96" y2="126.08" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
43
|
+
</g>
|
44
|
+
<g>
|
45
|
+
<rect x="275.56" y="98.72" width="8.27" height="27.35" style="fill: #fbc01a;"/>
|
46
|
+
<polygon points="283.84 100.13 275.56 100.13 274.37 95.4 285.23 95.4 283.84 100.13" style="fill: #fbc01a;"/>
|
47
|
+
<line x1="276.51" y1="100.13" x2="283.84" y2="100.13" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
48
|
+
<polygon points="275.57 126.08 283.84 126.08 285.04 130.8 274.17 130.8 275.57 126.08" style="fill: #fbc01a;"/>
|
49
|
+
<line x1="283.84" y1="126.08" x2="275.57" y2="126.08" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
50
|
+
</g>
|
51
|
+
<rect x="218.79" y="91.42" width="69.46" height="3.98" style="fill: #f9b500;"/>
|
52
|
+
<rect x="218.79" y="130.8" width="69.46" height="3.98" style="fill: #fbc01a;"/>
|
53
|
+
<rect x="209.25" y="134.79" width="88.53" height="4.09" style="fill: #f4b200;"/>
|
54
|
+
<path d="m216.67,88.29l34.23-15.08c2.1-.93,4.5-.93,6.6,0l34.23,15.08c1.62.71,1.11,3.13-.66,3.13h-73.75c-1.77,0-2.28-2.42-.66-3.13Z" style="fill: #fbc01a;"/>
|
55
|
+
<path d="m230.81,86.16l21.33-9.4c1.31-.58,2.8-.58,4.11,0l21.33,9.4c1.01.44.69,1.95-.41,1.95h-45.96c-1.1,0-1.42-1.51-.41-1.95Z" style="fill: #f4b200;"/>
|
56
|
+
<path d="m256.72,83.21c0-1.39-1.13-2.51-2.51-2.51s-2.51,1.13-2.51,2.51,1.13,2.51,2.51,2.51,2.51-1.13,2.51-2.51Z" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
57
|
+
<line x1="218.8" y1="131.54" x2="288.24" y2="131.54" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
58
|
+
<path d="m143.42,43.43l2.99-1.92c34.81-22.3,81.11-12.16,103.41,22.65h0" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 4px;"/>
|
59
|
+
<polyline points="242.93 64.16 250.34 64.16 250.34 56.12" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"/>
|
60
|
+
<path d="m253.66,141.68l-3.52,4.34c-28.53,29.92-75.91,31.04-105.83,2.5h0" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 4px;"/>
|
61
|
+
<polyline points="151 146.9 143.8 148.65 145.77 156.76" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"/>
|
62
|
+
</g>
|
63
|
+
</svg>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
viewBox="0 0 52 52"
|
5
|
+
width="100"
|
6
|
+
height="100"
|
7
|
+
>
|
8
|
+
<style>
|
9
|
+
.svg-failed {
|
10
|
+
stroke: white;
|
11
|
+
stroke-width: 5;
|
12
|
+
stroke-miterlimit: 10;
|
13
|
+
stroke-linecap: round;
|
14
|
+
stroke-linejoin: round;
|
15
|
+
fill: none;
|
16
|
+
animation: svg-failed-scale 0.3s ease-in-out 0.9s both;
|
17
|
+
}
|
18
|
+
|
19
|
+
.svg-failed-circle {
|
20
|
+
stroke: none;
|
21
|
+
fill: #FF5A5F;
|
22
|
+
}
|
23
|
+
|
24
|
+
.svg-failed-x {
|
25
|
+
stroke-dasharray: 48;
|
26
|
+
stroke-dashoffset: 48;
|
27
|
+
animation: svg-failed-draw 0.5s ease forwards 0.6s;
|
28
|
+
}
|
29
|
+
|
30
|
+
@keyframes svg-failed-draw {
|
31
|
+
to {
|
32
|
+
stroke-dashoffset: 0;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
@keyframes svg-failed-scale {
|
37
|
+
0%, 100% {
|
38
|
+
transform: scale(1);
|
39
|
+
}
|
40
|
+
50% {
|
41
|
+
transform: scale(1.1);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
</style>
|
45
|
+
|
46
|
+
<circle class="svg-failed-circle" cx="26" cy="26" r="25" />
|
47
|
+
<!-- X mark: two lines crossing -->
|
48
|
+
<path
|
49
|
+
class="svg-failed svg-failed-x"
|
50
|
+
d="M16 16 L36 36"
|
51
|
+
/>
|
52
|
+
<path
|
53
|
+
class="svg-failed svg-failed-x"
|
54
|
+
d="M36 16 L16 36"
|
55
|
+
/>
|
56
|
+
</svg>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<svg class="pl" width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<style>
|
3
|
+
.pl__ring { animation: ringA 3s linear infinite; }
|
4
|
+
.pl__ring--a { stroke: #F79E1B; }
|
5
|
+
.pl__ring--b { animation-name: ringB; stroke: #F79E1B; }
|
6
|
+
.pl__ring--c { animation-name: ringC; stroke: #F79E1B; }
|
7
|
+
.pl__ring--d { animation-name: ringD; stroke: #F79E1B; }
|
8
|
+
|
9
|
+
@keyframes ringA {
|
10
|
+
from, 4% { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -330; }
|
11
|
+
12% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -335; }
|
12
|
+
32% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -595; }
|
13
|
+
40%, 54% { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -660; }
|
14
|
+
62% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -665; }
|
15
|
+
82% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -925; }
|
16
|
+
90%, to { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -990; }
|
17
|
+
}
|
18
|
+
@keyframes ringB {
|
19
|
+
from, 12% { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -110; }
|
20
|
+
20% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -115; }
|
21
|
+
40% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -195; }
|
22
|
+
48%, 62% { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -220; }
|
23
|
+
70% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -225; }
|
24
|
+
90% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -305; }
|
25
|
+
98%, to { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -330; }
|
26
|
+
}
|
27
|
+
@keyframes ringC {
|
28
|
+
from { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: 0; }
|
29
|
+
8% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -5; }
|
30
|
+
28% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -175; }
|
31
|
+
36%, 58% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -220; }
|
32
|
+
66% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -225; }
|
33
|
+
86% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -395; }
|
34
|
+
94%, to { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -440; }
|
35
|
+
}
|
36
|
+
@keyframes ringD {
|
37
|
+
from, 8% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: 0; }
|
38
|
+
16% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -5; }
|
39
|
+
36% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -175; }
|
40
|
+
44%, 50% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -220; }
|
41
|
+
58% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -225; }
|
42
|
+
78% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -395; }
|
43
|
+
86%, to { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -440; }
|
44
|
+
}
|
45
|
+
</style>
|
46
|
+
<circle class="pl__ring pl__ring--a" cx="150" cy="150" r="105" fill="none" stroke-width="20" stroke-dasharray="0 660" stroke-dashoffset="-330" stroke-linecap="round"/>
|
47
|
+
<circle class="pl__ring pl__ring--b" cx="150" cy="150" r="35" fill="none" stroke-width="20" stroke-dasharray="0 220" stroke-dashoffset="-110" stroke-linecap="round"/>
|
48
|
+
<circle class="pl__ring pl__ring--c" cx="115" cy="150" r="70" fill="none" stroke-width="20" stroke-dasharray="0 440" stroke-linecap="round"/>
|
49
|
+
<circle class="pl__ring pl__ring--d" cx="185" cy="150" r="70" fill="none" stroke-width="20" stroke-dasharray="0 440" stroke-linecap="round"/>
|
50
|
+
</svg>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
4
|
+
viewBox="0 0 52 52"
|
5
|
+
width="100"
|
6
|
+
height="100"
|
7
|
+
>
|
8
|
+
<style>
|
9
|
+
.svg-checkmark {
|
10
|
+
stroke: white;
|
11
|
+
stroke-width: 5;
|
12
|
+
stroke-miterlimit: 10;
|
13
|
+
stroke-linecap: round;
|
14
|
+
stroke-linejoin: round;
|
15
|
+
fill: none;
|
16
|
+
animation: svg-success-scale 0.3s ease-in-out 0.9s both;
|
17
|
+
}
|
18
|
+
|
19
|
+
.svg-checkmark-circle {
|
20
|
+
stroke: none;
|
21
|
+
fill: #00D290;
|
22
|
+
}
|
23
|
+
|
24
|
+
.svg-checkmark-check {
|
25
|
+
stroke-dasharray: 48;
|
26
|
+
stroke-dashoffset: 48;
|
27
|
+
animation: svg-success-draw 0.5s ease forwards 0.6s;
|
28
|
+
}
|
29
|
+
|
30
|
+
@keyframes svg-success-draw {
|
31
|
+
to {
|
32
|
+
stroke-dashoffset: 0;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
@keyframes svg-success-scale {
|
37
|
+
0%, 100% {
|
38
|
+
transform: scale(1);
|
39
|
+
}
|
40
|
+
50% {
|
41
|
+
transform: scale(1.1);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
</style>
|
45
|
+
|
46
|
+
<circle class="svg-checkmark-circle" cx="26" cy="26" r="25" />
|
47
|
+
<path
|
48
|
+
class="svg-checkmark svg-checkmark-check"
|
49
|
+
d="M14.1 27.2l7.1 7.2 16.7-16.8"
|
50
|
+
/>
|
51
|
+
</svg>
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,65 @@
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function () {
|
2
|
+
// Initialize Select2 for all tenant-payment-icon-select elements
|
3
|
+
if (window.$ && $.fn.select2) {
|
4
|
+
$('.tenant-payment-icon-select').each(function () {
|
5
|
+
$(this).select2({
|
6
|
+
width: '100%'
|
7
|
+
});
|
8
|
+
});
|
9
|
+
}
|
10
|
+
|
11
|
+
// Handle icon selection change
|
12
|
+
document.querySelectorAll('.tenant-payment-icon-select').forEach(function (select) {
|
13
|
+
select.addEventListener('change', function (e) {
|
14
|
+
const field = e.target.name.match(/\[([^\]]*)\]$/)[1]; // Extract field name
|
15
|
+
const preview = document.getElementById(`icon-preview-${field}`);
|
16
|
+
const removeBtn = document.querySelector(`.remove-icon-btn[data-target="${field}"]`);
|
17
|
+
const iconPath = e.target.value;
|
18
|
+
|
19
|
+
if (!preview || !removeBtn) return;
|
20
|
+
|
21
|
+
if (!iconPath) {
|
22
|
+
preview.innerHTML = '<span class="no-icon-placeholder"></span>';
|
23
|
+
removeBtn.classList.add('hidden');
|
24
|
+
return;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Fetch SVG for the selected icon
|
28
|
+
fetch(`/admin/vector_icons/svg?path=${encodeURIComponent(iconPath)}`)
|
29
|
+
.then((response) => {
|
30
|
+
if (!response.ok) throw new Error('Failed to fetch SVG');
|
31
|
+
return response.text();
|
32
|
+
})
|
33
|
+
.then((svg) => {
|
34
|
+
preview.innerHTML = svg;
|
35
|
+
removeBtn.classList.remove('hidden');
|
36
|
+
})
|
37
|
+
.catch((error) => {
|
38
|
+
console.error('Error fetching SVG:', error);
|
39
|
+
preview.innerHTML = '<span class="no-icon-placeholder">Error loading icon</span>';
|
40
|
+
});
|
41
|
+
});
|
42
|
+
});
|
43
|
+
|
44
|
+
document.addEventListener('click', function (e) {
|
45
|
+
if (!e.target.classList.contains('remove-icon-btn')) return;
|
46
|
+
|
47
|
+
const field = e.target.getAttribute('data-target');
|
48
|
+
const select = document.querySelector(`.tenant-payment-icon-select[name*="[${field}]"]`);
|
49
|
+
const preview = document.getElementById(`icon-preview-${field}`);
|
50
|
+
const removeBtn = e.target;
|
51
|
+
|
52
|
+
if (!select || !preview || !removeBtn) return;
|
53
|
+
|
54
|
+
// Clear the select input
|
55
|
+
select.value = '';
|
56
|
+
|
57
|
+
if (window.$ && $(select).hasClass('select2-hidden-accessible')) {
|
58
|
+
$(select).val('').trigger('change.select2');
|
59
|
+
} else {
|
60
|
+
select.dispatchEvent(new Event('change', { bubbles: true }));
|
61
|
+
}
|
62
|
+
preview.innerHTML = '<span class="no-icon-placeholder"></span>';
|
63
|
+
removeBtn.classList.add('hidden');
|
64
|
+
});
|
65
|
+
});
|
@@ -55,9 +55,8 @@ $day-background: theme-color("light");
|
|
55
55
|
}
|
56
56
|
}
|
57
57
|
|
58
|
-
.wday-0 {
|
59
|
-
|
60
|
-
}
|
58
|
+
// .wday-0 {
|
59
|
+
// }
|
61
60
|
|
62
61
|
// .wday-1 {
|
63
62
|
// }
|
@@ -74,9 +73,8 @@ $day-background: theme-color("light");
|
|
74
73
|
// .wday-5 {
|
75
74
|
// }
|
76
75
|
|
77
|
-
.wday-6 {
|
78
|
-
|
79
|
-
}
|
76
|
+
// .wday-6 {
|
77
|
+
// }
|
80
78
|
|
81
79
|
// .today {
|
82
80
|
// }
|
@@ -88,7 +86,9 @@ $day-background: theme-color("light");
|
|
88
86
|
// }
|
89
87
|
|
90
88
|
// known as active-date
|
91
|
-
|
89
|
+
.start-date {
|
90
|
+
background-color: darken($day-background, 5%);
|
91
|
+
}
|
92
92
|
|
93
93
|
// .prev-month {
|
94
94
|
// }
|
@@ -159,8 +159,11 @@ $day-background: theme-color("light");
|
|
159
159
|
|
160
160
|
// .current-month {}
|
161
161
|
.has-events {
|
162
|
+
background-color: lighten(theme-color("warning"), 30%);
|
163
|
+
color: darken(theme-color("warning"), 50%);
|
164
|
+
|
162
165
|
@include hover {
|
163
|
-
background-color:
|
166
|
+
background-color: theme-color("warning");
|
164
167
|
}
|
165
168
|
}
|
166
169
|
|
@@ -0,0 +1,60 @@
|
|
1
|
+
.payment-icon-preview {
|
2
|
+
width: 80px;
|
3
|
+
height: 80px;
|
4
|
+
background: #f8f9fa;
|
5
|
+
border: 1px dashed #ccc;
|
6
|
+
display: inline-flex;
|
7
|
+
align-items: center;
|
8
|
+
justify-content: center;
|
9
|
+
cursor: pointer;
|
10
|
+
}
|
11
|
+
|
12
|
+
.payment-icon-preview svg {
|
13
|
+
width: 100%;
|
14
|
+
height: 100%;
|
15
|
+
object-fit: contain;
|
16
|
+
}
|
17
|
+
|
18
|
+
|
19
|
+
.no-icon-placeholder {
|
20
|
+
width: 40px;
|
21
|
+
height: 40px;
|
22
|
+
border: 1px dashed #ddd;
|
23
|
+
background: #f8f9fa;
|
24
|
+
display: inline-block;
|
25
|
+
}
|
26
|
+
|
27
|
+
.icon-preview-container {
|
28
|
+
position: relative;
|
29
|
+
display: inline-block;
|
30
|
+
}
|
31
|
+
|
32
|
+
.remove-icon-btn {
|
33
|
+
position: absolute;
|
34
|
+
top: -8px;
|
35
|
+
right: -8px;
|
36
|
+
width: 24px;
|
37
|
+
height: 24px;
|
38
|
+
border-radius: 50%;
|
39
|
+
background: #dc3545;
|
40
|
+
color: white;
|
41
|
+
border: 2px solid white;
|
42
|
+
display: flex;
|
43
|
+
align-items: center;
|
44
|
+
justify-content: center;
|
45
|
+
cursor: pointer;
|
46
|
+
font-size: 12px;
|
47
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
48
|
+
transition: all 0.2s ease;
|
49
|
+
z-index: 10;
|
50
|
+
}
|
51
|
+
|
52
|
+
.remove-icon-btn:hover {
|
53
|
+
background: #c82333;
|
54
|
+
transform: scale(1.1);
|
55
|
+
box-shadow: 0 3px 6px rgba(0,0,0,0.3);
|
56
|
+
}
|
57
|
+
|
58
|
+
.remove-icon-btn.hidden {
|
59
|
+
display: none;
|
60
|
+
}
|
@@ -6,8 +6,9 @@ module SpreeCmCommissioner
|
|
6
6
|
after_action :set_cache_control_for_cdn
|
7
7
|
end
|
8
8
|
|
9
|
+
# Override This Method based on your UseCase
|
9
10
|
def max_age
|
10
|
-
ENV.fetch('CONTENT_CACHE_MAX_AGE',
|
11
|
+
ENV.fetch('CONTENT_CACHE_MAX_AGE', 1.day.to_i).to_i
|
11
12
|
end
|
12
13
|
|
13
14
|
def set_cache_control_for_cdn
|