-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add export cac form submissions option (#2183)
* Add export cac form submissions * update template name * Fix lint issue * update comment service to use the new document generation service method * remove unnecessary checks * remove unused import * remove console logs * remove problematic check * Remove unused import * Remove unused variable
- Loading branch information
1 parent
2b89a3d
commit 4d50737
Showing
18 changed files
with
237 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
""" Add new document type and template for cac form submission export | ||
Revision ID: 7ebd9ecfccdd | ||
Revises: 3a88de1e3e7f | ||
Create Date: 2023-09-12 14:58:03.712784 | ||
""" | ||
from datetime import datetime | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '7ebd9ecfccdd' | ||
down_revision = '3a88de1e3e7f' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
document_type = sa.Table( | ||
'generated_document_type', | ||
sa.MetaData(), | ||
sa.Column('id', sa.Integer), | ||
sa.Column('name', sa.String), | ||
sa.Column('description', sa.String), | ||
sa.Column('created_date', sa.DateTime, default=datetime.utcnow) | ||
) | ||
|
||
document_template = sa.Table( | ||
'generated_document_template', | ||
sa.MetaData(), | ||
sa.Column('id', sa.Integer), | ||
sa.Column('type_id', sa.Integer), | ||
sa.Column('hash_code', sa.String), | ||
sa.Column('extension', sa.String), | ||
sa.Column('created_date', sa.DateTime, default=datetime.utcnow) | ||
) | ||
|
||
op.bulk_insert(document_type, [ | ||
{'id': 2, 'name': 'cac_form_sheet', 'description': 'cac form submission export for staff'} | ||
]) | ||
|
||
op.bulk_insert(document_template, [ | ||
{'id': 2, 'type_id': 2, 'hash_code': None, "extension": "xlsx"} | ||
]) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.execute('DELETE FROM document_type WHERE id = 2') | ||
op.execute('DELETE FROM document_template WHERE id = 2') | ||
# ### end Alembic commands ### |
Binary file added
BIN
+7.97 KB
met-api/src/met_api/generated_documents_carbone_templates/cac_forms_sheet.xlsx
Binary file not shown.
Binary file modified
BIN
+2.97 KB
(160%)
met-api/src/met_api/generated_documents_carbone_templates/staff_comments_sheet.xlsx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.