Skip to content

Commit

Permalink
feat: added equipment release
Browse files Browse the repository at this point in the history
  • Loading branch information
bineenasc committed Dec 26, 2024
1 parent 6c77ffb commit 08dc25a
Show file tree
Hide file tree
Showing 11 changed files with 249 additions and 55 deletions.
59 changes: 39 additions & 20 deletions api/.aeria/aeria-sdk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ declare type MirrorDescriptions = {
"name": {
"type": "string"
},
"type": {
"enum": [
"physical",
"digital"
]
},
"code": {
"type": "string"
},
Expand Down Expand Up @@ -53,22 +47,19 @@ declare type MirrorDescriptions = {
},
"icon": "desktop-tower",
"table": [
"type",
"name",
"code",
"includes_accessories",
"registered_by",
"observation"
],
"required": [
"type",
"name",
"code",
"includes_accessories",
"registered_by"
],
"filters": [
"type",
"name",
"includes_accessories",
"registered_by"
Expand All @@ -78,7 +69,6 @@ declare type MirrorDescriptions = {
],
"search": {
"indexes": [
"type",
"name",
"code"
],
Expand Down Expand Up @@ -132,6 +122,18 @@ declare type MirrorDescriptions = {
"is_active": {
"type": "boolean"
},
"picture_file": {
"$ref": "file",
"accept": [
"image/*"
],
"indexes": [
"name",
"link",
"type",
"size"
]
},
"admission_date": {
"type": "string",
"format": "date"
Expand Down Expand Up @@ -160,14 +162,13 @@ declare type MirrorDescriptions = {
"name",
"corporate_email",
"is_active",
"arrive_date",
"admission_date",
"exit_date"
],
"required": [
"name",
"corporate_email",
"contact",
"is_active"
"contact"
],
"presets": [
"crud"
Expand Down Expand Up @@ -218,26 +219,43 @@ declare type MirrorDescriptions = {
}
}
},
"equipment_Release": {
"$id": "equipment_Release",
"equipmentRelease": {
"$id": "equipmentRelease",
"properties": {
"equipments": {
"type": "array",
"items": {
"$ref": "asset",
"populate": [
"name",
"code"
],
"indexes": [
"name"
]
}
},
"delivered_to": {
"$ref": "employee",
"populate": [
"name",
"corporate_email",
"contact",
"is_active",
"picture_file",
"admission_date",
"exit_date"
],
"indexes": [
"name"
]
},
"delivered_by": {
"$ref": "user",
"populate": [
"name",
"email"
],
"indexes": [
"name"
]
Expand Down Expand Up @@ -267,7 +285,8 @@ declare type MirrorDescriptions = {
},
"icon": "gauge",
"table": [
"delivered_to"
"delivered_to",
"delivered_by"
],
"required": [
"equipments",
Expand Down Expand Up @@ -692,31 +711,31 @@ declare type MirrorRouter = {
"builtin": true
}
},
"/equipment_Release/get": {
"/equipmentRelease/get": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/equipment_Release/getAll": {
"/equipmentRelease/getAll": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/equipment_Release/insert": {
"/equipmentRelease/insert": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/equipment_Release/remove": {
"/equipmentRelease/remove": {
"POST": {
"roles": [
"root"
Expand Down
24 changes: 13 additions & 11 deletions api/schemas/main.aeria
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ collection TempFile extends aeria.tempFile {}
collection User extends aeria.user {
properties {
name str
email str
roles []enum @values([
"rh"
])
Expand All @@ -22,6 +23,7 @@ collection Employee {
corporate_email str
contact str
is_active bool
picture_file File @accept(["image/*"])
admission_date str @format("date")
exit_date str @format("date")
}
Expand All @@ -38,13 +40,12 @@ collection Employee {
name
corporate_email
contact
is_active
}
table{
name
corporate_email
is_active
arrive_date
admission_date
exit_date
}
}
Expand All @@ -53,7 +54,7 @@ collection Asset {
icon "desktop-tower"
properties {
name str
type enum @values(["physical", "digital"])
// type enum @values(["physical", "digital"])
code str
includes_accessories bool
registered_by User
Expand All @@ -69,42 +70,42 @@ collection Asset {
crud
}
required{
type
// type
name
code
includes_accessories
registered_by
}
table{
type
// type
name
code
includes_accessories
registered_by
observation
}
filters{
type
// type
name
includes_accessories
registered_by
}
search{
placeholder "Insira a pesquisa aqui"
indexes {
type
// type
name
code
}
}
}

collection Equipment_Release {
collection EquipmentRelease {
icon "gauge"
properties {
equipments []Asset
delivered_to Employee
delivered_by User
equipments []Asset @populate([name, code])
delivered_to Employee @populate([name, corporate_email, contact, is_active, picture_file, admission_date, exit_date])
delivered_by User @populate([name, email])
allocation_date str @format("date-time")
collection_date str @format("date-time")
}
Expand Down Expand Up @@ -132,6 +133,7 @@ collection Equipment_Release {
}
table{
delivered_to
delivered_by
}
}

Expand Down
Loading

0 comments on commit 08dc25a

Please sign in to comment.