remove recorded by
All checks were successful
Build and Publish / build-release (push) Successful in 1m33s
All checks were successful
Build and Publish / build-release (push) Successful in 1m33s
This commit is contained in:
@@ -12,7 +12,8 @@ defmodule WorkloadServiceWeb.TaskController do
|
||||
|
||||
operation(:list,
|
||||
summary: "List tasks",
|
||||
parameters: QueryHelpers.flop(
|
||||
parameters:
|
||||
QueryHelpers.flop(
|
||||
[:status, :application_id, :policy_type],
|
||||
[:created_at, :updated_at, :status]
|
||||
),
|
||||
@@ -93,13 +94,14 @@ defmodule WorkloadServiceWeb.TaskController do
|
||||
|
||||
{:ok, %{status: "created"} = _task} ->
|
||||
task_id = TaskId.parse!(id)
|
||||
|
||||
command = %WorkloadService.Commands.QuoteTask.SubmitResponse{
|
||||
id: task_id,
|
||||
submission: %{
|
||||
"quote_id" => params["quote_id"],
|
||||
"plans" => params["plans"],
|
||||
"valid_until" => params["valid_until"],
|
||||
"recorded_by" => params["recorded_by"],
|
||||
"recorded_by" => "system",
|
||||
"document_data" => params["document_data"]
|
||||
},
|
||||
attachments: List.wrap(params["document_url"])
|
||||
@@ -119,13 +121,14 @@ defmodule WorkloadServiceWeb.TaskController do
|
||||
|
||||
{:ok, %{status: "created"} = _task} ->
|
||||
task_id = TaskId.parse!(id)
|
||||
|
||||
command = %WorkloadService.Commands.SolicitationTask.SubmitResponse{
|
||||
id: task_id,
|
||||
submission: %{
|
||||
"provider_policy_number" => params["provider_policy_number"],
|
||||
"effective_date" => params["effective_date"],
|
||||
"expiry_date" => params["expiry_date"],
|
||||
"recorded_by" => params["recorded_by"] || "system"
|
||||
"recorded_by" => "system"
|
||||
},
|
||||
attachments: []
|
||||
}
|
||||
|
||||
@@ -73,10 +73,9 @@ defmodule WorkloadServiceWeb.Schemas.Task do
|
||||
OpenApiSpex.schema(%{
|
||||
title: "QuoteSubmissionDetail",
|
||||
type: :object,
|
||||
required: [:quote_id, :recorded_by, :valid_until, :plans],
|
||||
required: [:quote_id, :valid_until, :plans],
|
||||
properties: %{
|
||||
quote_id: %Schema{type: :string},
|
||||
recorded_by: %Schema{type: :string},
|
||||
valid_until: %Schema{type: :string, format: :date},
|
||||
plans: %Schema{type: :array, items: Plan, minItems: 1},
|
||||
document_data: %Schema{type: :object, additionalProperties: true, nullable: true},
|
||||
@@ -163,7 +162,10 @@ defmodule WorkloadServiceWeb.Schemas.Task do
|
||||
application_id: %Schema{type: :string},
|
||||
policy_type: %Schema{type: :string, enum: ["car", "life", "fire"]},
|
||||
task_info: %Schema{oneOf: [QuoteTaskInfo, SolicitationTaskInfo]},
|
||||
submission: %Schema{oneOf: [QuoteSubmissionDetail, SolicitationSubmissionDetail], nullable: true},
|
||||
submission: %Schema{
|
||||
oneOf: [QuoteSubmissionDetail, SolicitationSubmissionDetail],
|
||||
nullable: true
|
||||
},
|
||||
attachments: %Schema{type: :array, items: %Schema{type: :string}},
|
||||
status: %Schema{type: :string, enum: ["created", "draft", "approved", "completed"]},
|
||||
created_at: %Schema{type: :string, format: :"date-time"},
|
||||
|
||||
Reference in New Issue
Block a user