Add basic CSV export, mac db update
This commit is contained in:
43
inventory/pages/export_page.py
Normal file
43
inventory/pages/export_page.py
Normal file
@@ -0,0 +1,43 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import * # type: ignore
|
||||
|
||||
import rio
|
||||
|
||||
from db_classes import *
|
||||
from .. import components as comps
|
||||
import asyncio
|
||||
|
||||
class ExportPage(rio.Component):
|
||||
code: str = ""
|
||||
popup_message: str = ""
|
||||
popup_show: bool = False
|
||||
popup_color: str = 'warning'
|
||||
description: str = ""
|
||||
name: str = ""
|
||||
parent_code: str = ""
|
||||
parent: str = ""
|
||||
|
||||
@rio.event.periodic(1)
|
||||
def set_office_init(self):
|
||||
self.office = self.session[comps.Settings].office
|
||||
#print("Populated:", self.office)
|
||||
|
||||
def build(self) -> rio.Component:
|
||||
return rio.Column(
|
||||
rio.Text(
|
||||
text="Database CSV Below:",
|
||||
style='heading1',
|
||||
align_x = 0.5
|
||||
),
|
||||
rio.MultiLineTextInput(
|
||||
label="CSV",
|
||||
text=dump_csv()
|
||||
),
|
||||
spacing=2,
|
||||
min_width=60,
|
||||
margin_bottom=4,
|
||||
align_x=0.5,
|
||||
align_y=0,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user