Skip to content

Commit

Permalink
remove year type
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur committed Nov 27, 2024
1 parent d30c22e commit b15d587
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion papermerge/core/features/custom_fields/db/orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class CustomFieldValue(Base):
value_float: Mapped[float] = mapped_column(nullable=True)
value_monetary: Mapped[Decimal] = mapped_column(nullable=True)
value_yearmonth: Mapped[float] = mapped_column(nullable=True)
value_year: Mapped[int] = mapped_column(nullable=True)
created_at: Mapped[datetime] = mapped_column(insert_default=func.now())

def __repr__(self):
Expand Down
2 changes: 0 additions & 2 deletions papermerge/core/features/custom_fields/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class CustomFieldType(str, Enum):
monetary = "monetary"
# for salaries: e.g. "February, 2023"
yearmonth = "yearmonth"
# for tax declarations: e.g. 2023
year = "year"


class CustomField(BaseModel):
Expand Down
1 change: 0 additions & 1 deletion papermerge/core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ class CFVValueColumn(str, Enum):
MONETARY = 'value_monetary'
BOOLEAN = 'value_boolean'
YEARMONTH = 'value_yearmonth'
YEAR = 'value_year'
3 changes: 1 addition & 2 deletions ui2/src/cconstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export const CUSTOM_FIELD_DATA_TYPES: Array<CustomFieldDataType> = [
"int",
"float",
"monetary",
"yearmonth",
"year"
"yearmonth"
]

export const CURRENCIES = [
Expand Down
1 change: 0 additions & 1 deletion ui2/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ export type CustomFieldDataType =
| "float"
| "monetary"
| "yearmonth"
| "year"

export type NewCustomField = {
name: string
Expand Down

0 comments on commit b15d587

Please sign in to comment.