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