Add province-scoped branches for loan paid letters and harden loans.user_id.
Expose GET /loan-paid-off-letters/branches?province_id= for form pickers, require loans.user_id, and proxy the Vite frontend under /online/. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
105
docs/docs.go
105
docs/docs.go
@@ -1985,6 +1985,12 @@ const docTemplate = `{
|
||||
"name": "passport_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by customer name",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by status",
|
||||
@@ -4163,105 +4169,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/provinces/etraps": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns provinces (etraps) belonging to the selected region",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"province"
|
||||
],
|
||||
"summary": "List etraps by region",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Region name (en, ru or tm)",
|
||||
"name": "region",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Only active etraps",
|
||||
"name": "active",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/provinces/regions": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns unique regions from the provinces table (for region dropdown)",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"province"
|
||||
],
|
||||
"summary": "List distinct regions",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Only active provinces",
|
||||
"name": "active",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/provinces/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
|
||||
@@ -1979,6 +1979,12 @@
|
||||
"name": "passport_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by customer name",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by status",
|
||||
@@ -4157,105 +4163,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/provinces/etraps": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns provinces (etraps) belonging to the selected region",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"province"
|
||||
],
|
||||
"summary": "List etraps by region",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Region name (en, ru or tm)",
|
||||
"name": "region",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Only active etraps",
|
||||
"name": "active",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/provinces/regions": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns unique regions from the provinces table (for region dropdown)",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"province"
|
||||
],
|
||||
"summary": "List distinct regions",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Only active provinces",
|
||||
"name": "active",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/provinces/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
|
||||
@@ -2476,6 +2476,10 @@ paths:
|
||||
in: query
|
||||
name: passport_id
|
||||
type: string
|
||||
- description: Filter by customer name
|
||||
in: query
|
||||
name: name
|
||||
type: string
|
||||
- description: Filter by status
|
||||
in: query
|
||||
name: status
|
||||
@@ -3981,69 +3985,6 @@ paths:
|
||||
summary: Update province
|
||||
tags:
|
||||
- province
|
||||
/provinces/etraps:
|
||||
get:
|
||||
description: Returns provinces (etraps) belonging to the selected region
|
||||
parameters:
|
||||
- description: Region name (en, ru or tm)
|
||||
in: query
|
||||
name: region
|
||||
required: true
|
||||
type: string
|
||||
- default: true
|
||||
description: Only active etraps
|
||||
in: query
|
||||
name: active
|
||||
type: boolean
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: List etraps by region
|
||||
tags:
|
||||
- province
|
||||
/provinces/regions:
|
||||
get:
|
||||
description: Returns unique regions from the provinces table (for region dropdown)
|
||||
parameters:
|
||||
- default: true
|
||||
description: Only active provinces
|
||||
in: query
|
||||
name: active
|
||||
type: boolean
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: List distinct regions
|
||||
tags:
|
||||
- province
|
||||
/reasons-cards:
|
||||
get:
|
||||
description: Returns paginated reason cards with optional filters
|
||||
|
||||
Reference in New Issue
Block a user