ajuste no rails
This commit is contained in:
parent
06fb628248
commit
dd02b98346
@ -1,6 +1,4 @@
|
|||||||
class Public::Api::V1::Captain::InterWebhooksController < ApplicationController
|
class Public::Api::V1::Captain::InterWebhooksController < ActionController::API
|
||||||
skip_before_action :verify_authenticity_token
|
|
||||||
|
|
||||||
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
||||||
def create
|
def create
|
||||||
payload = JSON.parse(request.body.read)
|
payload = JSON.parse(request.body.read)
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
module Captain
|
module Captain
|
||||||
class Configuration < ApplicationRecord
|
class Configuration < ApplicationRecord
|
||||||
|
self.table_name = 'captain_configurations'
|
||||||
|
|
||||||
belongs_to :account
|
belongs_to :account
|
||||||
|
|
||||||
validates :account_id, presence: true
|
validates :account_id, presence: true
|
||||||
|
|||||||
@ -18,16 +18,23 @@ The user reported that changing settings in the dashboard had no effect on the p
|
|||||||
- Verified `Public::Api::V1::Captain::MasterDataController` returns the `captain_configuration` data.
|
- Verified `Public::Api::V1::Captain::MasterDataController` returns the `captain_configuration` data.
|
||||||
|
|
||||||
2. **Frontend (`App.vue`)**:
|
2. **Frontend (`App.vue`)**:
|
||||||
|
|
||||||
- Updated `fetchMasterData` to consume `app_config` from the API response.
|
- Updated `fetchMasterData` to consume `app_config` from the API response.
|
||||||
- Made `appConfig` reactive to the fetched data (`title`, `subtitle`, `phone_number`, `primary_color`, `secondary_color`).
|
- Made `appConfig` reactive to the fetched data (`title`, `subtitle`, `phone_number`, `primary_color`, `secondary_color`).
|
||||||
- Added dynamic background gradient using `primary_color` and `secondary_color`.
|
- Added dynamic background gradient using `primary_color` and `secondary_color`.
|
||||||
- Added "Suporte: [Phone]" display in the header/subtitle area if a phone number is set.
|
- Added "Suporte: [Phone]" display in the header/subtitle area if a phone number is set.
|
||||||
|
|
||||||
|
3. **Backend Fix (Part 2)**:
|
||||||
|
- Addressed `PG::UndefinedTable` error by explicitly setting `self.table_name = 'captain_configurations'` in `Captain::Configuration` model.
|
||||||
|
- Addressed `ActionController::ParameterMissing` by updating frontend payload structure.
|
||||||
|
|
||||||
## Files Changed
|
## Files Changed
|
||||||
|
|
||||||
- `db/migrate/20260114101014_add_phone_number_to_captain_configurations.rb` (New)
|
- `db/migrate/20260114101014_add_phone_number_to_captain_configurations.rb` (New)
|
||||||
- `enterprise/app/controllers/api/v1/accounts/captain/configurations_controller.rb`
|
- `enterprise/app/controllers/api/v1/accounts/captain/configurations_controller.rb`
|
||||||
|
- `enterprise/app/models/captain/configuration.rb` (Added table_name)
|
||||||
- `app/javascript/captain_booking/App.vue`
|
- `app/javascript/captain_booking/App.vue`
|
||||||
|
- `app/javascript/dashboard/routes/dashboard/captain/configurations/Index.vue`
|
||||||
|
|
||||||
## Validation
|
## Validation
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user