api.routes.internal.paie ======================== .. py:module:: api.routes.internal.paie .. autoapi-nested-parse:: Payroll ("Paie") support for RewakeApp: the timesheet PDF and the emails (reminders, the month sent to the accountant). The app owns the data and the rules; these routes only render and send. Attributes ---------- .. autoapisummary:: api.routes.internal.paie.logger api.routes.internal.paie.router api.routes.internal.paie.SENDER_DOMAIN api.routes.internal.paie.MAX_ATTACHMENTS_BYTES Classes ------- .. autoapisummary:: api.routes.internal.paie.TimesheetRow api.routes.internal.paie.TimesheetTotals api.routes.internal.paie.TimesheetIn api.routes.internal.paie.Attachment api.routes.internal.paie.EmailIn Functions --------- .. autoapisummary:: api.routes.internal.paie.timesheet api.routes.internal.paie.email Package Contents ---------------- .. py:data:: logger .. py:data:: router .. py:data:: SENDER_DOMAIN :value: '@rewake.fr' .. py:data:: MAX_ATTACHMENTS_BYTES :value: 20971520 .. py:class:: TimesheetRow Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: kind :type: str .. py:attribute:: weekday :type: str :value: '' .. py:attribute:: day :type: int | None :value: None .. py:attribute:: week :type: int | None :value: None .. py:attribute:: worked :type: str :value: '' .. py:attribute:: non_worked :type: str :value: '' .. py:attribute:: motif :type: str :value: '' .. py:attribute:: hs125 :type: str :value: '' .. py:attribute:: hs150 :type: str :value: '' .. py:class:: TimesheetTotals Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: worked :type: str :value: '' .. py:attribute:: non_worked :type: str :value: '' .. py:attribute:: hs125 :type: str :value: '' .. py:attribute:: hs150 :type: str :value: '' .. py:class:: TimesheetIn Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: manager :type: str .. py:attribute:: employee :type: str .. py:attribute:: contract :type: str .. py:attribute:: month_label :type: str .. py:attribute:: place :type: str .. py:attribute:: date :type: str .. py:attribute:: rows :type: list[TimesheetRow] .. py:attribute:: totals :type: TimesheetTotals .. py:function:: timesheet(payload: TimesheetIn) -> fastapi.responses.Response The month's timesheet in the accountant's Excel layout, as a PDF. .. py:class:: Attachment Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: filename :type: str .. py:attribute:: content_base64 :type: str .. py:class:: EmailIn Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: sender :type: str .. py:attribute:: to :type: list[str] .. py:attribute:: cc :type: list[str] .. py:attribute:: subject :type: str .. py:attribute:: body :type: str .. py:attribute:: attachments :type: list[Attachment] .. py:function:: email(payload: EmailIn) -> dict[str, bool]