instruction
stringlengths
0
1k
input
stringlengths
1
1k
output
stringlengths
10
6.51k
if item["name"] != "Credit Cards" ) ) return round(other_liabilities + abs(cc_balance), 2) @rx.var def asset_percentages( self, ) -> List[AssetLiabilitySummaryItem]: """Calculate asset percentages.""" total = self.total_assets if total ...
current_liability_summary = [] for item in self.liabilities_summary: if item["name"] == "Credit Cards": cc_balance = next( ( cat["total_balance"] for cat in self.account_categories if...
if total == 0: return [ { "name": item["name"], "value": 0.0, "color": item["color"], } for item in self.liabilities_summary ]
" total = self.total_assets if total == 0: return [ { "name": item["name"], "value": 0.0, "color": item["color"], } for item in self.assets_summary ] return [ ...
for item in self.liabilities_summary: if item["name"] == "Credit Cards": cc_balance = next( ( cat["total_balance"] for cat in self.account_categories if cat["category_name"] == "Credit Cards"...
current_liability_summary = []
if total == 0: return [ { "name": item["name"], "value": 0.0, "color": item["color"], } for item in self.assets_summary ] return [ { "name": item["...
return [ { "name": item["name"], "value": round(item["value"] / total * 100, 1), "color": item["color"], } for item in current_liability_summary if item["value"] > 0 ] @rx.event def set_active_page(...
for item in self.liabilities_summary: if item["name"] == "Credit Cards": cc_balance = next( ( cat["total_balance"] for cat in self.account_categories if cat["category_name"] == "Credit Cards" ...
{ "name": item["name"], "value": 0.0, "color": item["color"], } for item in self.assets_summary ] return [ { "name": item["name"], "value": round(item["value...
return [ { "name": item["name"], "value": round(item["value"] / total * 100, 1), "color": item["color"], } for item in current_liability_summary if item["value"] > 0 ] @rx.event def set_active_page(...
if item["name"] == "Credit Cards": cc_balance = next( ( cat["total_balance"] for cat in self.account_categories if cat["category_name"] == "Credit Cards" ), 0, ...
"value": 0.0, "color": item["color"], } for item in self.assets_summary ] return [ { "name": item["name"], "value": round(item["value"] / total * 100, 1), "color": item...
current_liability_summary.append({**item, "value": abs(cc_balance)}) else: current_liability_summary.append(item) return [ { "name": item["name"], "value": round(item["value"] / total * 100, 1), "color": ite...
cc_balance = next( ( cat["total_balance"] for cat in self.account_categories if cat["category_name"] == "Credit Cards" ), 0, )
"color": item["color"], } for item in self.liabilities_summary ] current_liability_summary = [] for item in self.liabilities_summary: if item["name"] == "Credit Cards": cc_balance = next( ( ...
@rx.event def toggle_account_category(self, category_index: int): """Toggle the open/closed state of an account category.""" if 0 <= category_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_in...
def set_active_page(self, page_name: str): """Set the currently active page in the sidebar.""" self.active_page = page_name
] current_liability_summary = [] for item in self.liabilities_summary: if item["name"] == "Credit Cards": cc_balance = next( ( cat["total_balance"] for cat in self.account_categories ...
@rx.event def toggle_account_category(self, category_index: int): """Toggle the open/closed state of an account category.""" if 0 <= category_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_in...
self.active_page = page_name
for item in self.liabilities_summary: if item["name"] == "Credit Cards": cc_balance = next( ( cat["total_balance"] for cat in self.account_categories if cat["category_name"] == "Credit Cards" ...
@rx.event def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value in self.graph_ranges: self.selected_graph_range = value else: pass @rx.event def set_summary_view(self, view: str): """Set the summary vi...
def toggle_account_category(self, category_index: int): """Toggle the open/closed state of an account category.""" if 0 <= category_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_index]["is_open"] = no...
( cat["total_balance"] for cat in self.account_categories if cat["category_name"] == "Credit Cards" ), 0, ) current_liability_summary.append({**item, "value": ...
@rx.event def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value in self.graph_ranges: self.selected_graph_range = value else: pass @rx.event def set_summary_view(self, view: str): """Set the summary vi...
if 0 <= category_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_index]["is_open"] = not new_categories[ category_index ]["is_open"] self.account_categories = new_categories
for cat in self.account_categories if cat["category_name"] == "Credit Cards" ), 0, ) current_liability_summary.append({**item, "value": abs(cc_balance)}) else: current_liabili...
new_categories[category_index]["is_open"] = not new_categories[ category_index ]["is_open"] self.account_categories = new_categories @rx.event def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value i...
new_categories = [dict(cat) for cat in self.account_categories]
if cat["category_name"] == "Credit Cards" ), 0, ) current_liability_summary.append({**item, "value": abs(cc_balance)}) else: current_liability_summary.append(item) return [ { "name...
self.account_categories = new_categories @rx.event def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value in self.graph_ranges: self.selected_graph_range = value else: pass @rx.event def set_summary...
new_categories[category_index]["is_open"] = not new_categories[ category_index ]["is_open"]
t_liability_summary.append({**item, "value": abs(cc_balance)}) else: current_liability_summary.append(item) return [ { "name": item["name"], "value": round(item["value"] / total * 100, 1), "color": item["color"], ...
@rx.event def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value in self.graph_ranges: self.selected_graph_range = value else: pass @rx.event def set_summary_view(self, view: str): """Set the summary vi...
self.account_categories = new_categories
}) else: current_liability_summary.append(item) return [ { "name": item["name"], "value": round(item["value"] / total * 100, 1), "color": item["color"], } for item in current_liability_summary ...
@rx.event def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" ...
def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value in self.graph_ranges: self.selected_graph_range = value else: pass
{ "name": item["name"], "value": round(item["value"] / total * 100, 1), "color": item["color"], } for item in current_liability_summary if item["value"] > 0 ] @rx.event def set_active_page(self, page_name: str): ...
@rx.event def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" ...
if value in self.graph_ranges: self.selected_graph_range = value else: pass
"value": round(item["value"] / total * 100, 1), "color": item["color"], } for item in current_liability_summary if item["value"] > 0 ] @rx.event def set_active_page(self, page_name: str): """Set the currently active page in the si...
else: pass @rx.event def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account da...
self.selected_graph_range = value
: item["color"], } for item in current_liability_summary if item["value"] > 0 ] @rx.event def set_active_page(self, page_name: str): """Set the currently active page in the sidebar.""" self.active_page = page_name @rx.event def toggle_account...
@rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value...
def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view
lue"] > 0 ] @rx.event def set_active_page(self, page_name: str): """Set the currently active page in the sidebar.""" self.active_page = page_name @rx.event def toggle_account_category(self, category_index: int): """Toggle the open/closed state of an account category."""...
@rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value...
if view in ["Totals", "Percent"]: self.summary_view = view
_active_page(self, page_name: str): """Set the currently active page in the sidebar.""" self.active_page = page_name @rx.event def toggle_account_category(self, category_index: int): """Toggle the open/closed state of an account category.""" if 0 <= category_index < len(self.acc...
@rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value...
self.summary_view = view
ggle_account_category(self, category_index: int): """Toggle the open/closed state of an account category.""" if 0 <= category_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_index]["is_open"] = not new_...
self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self....
new_data = generate_net_worth_data()
nt): """Toggle the open/closed state of an account category.""" if 0 <= category_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_index]["is_open"] = not new_categories[ category_index ...
self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( ...
self._raw_net_worth_data = new_data
of an account category.""" if 0 <= category_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_index]["is_open"] = not new_categories[ category_index ]["is_open"] self.acco...
if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_...
self.net_worth = new_data[-1]["value"]
egory_index < len(self.account_categories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_index]["is_open"] = not new_categories[ category_index ]["is_open"] self.account_categories = new_categories @rx.event ...
new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balan...
if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value...
gories): new_categories = [dict(cat) for cat in self.account_categories] new_categories[category_index]["is_open"] = not new_categories[ category_index ]["is_open"] self.account_categories = new_categories @rx.event def set_graph_range(self, value...
self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, ) else: ...
month_ago_value = new_data[-31]["value"]
cat in self.account_categories] new_categories[category_index]["is_open"] = not new_categories[ category_index ]["is_open"] self.account_categories = new_categories @rx.event def set_graph_range(self, value: str): """Set the time range for the net wor...
if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, ) else: self.net_worth_change_percent = 0.0 else: self.net_worth_c...
self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2)
= not new_categories[ category_index ]["is_open"] self.account_categories = new_categories @rx.event def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value in self.graph_ranges: self.selected_graph_ra...
else: self.net_worth_change_amount = 0.0 self.net_worth_change_percent = 0.0 new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accou...
if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, ) else: self.net_worth_change_percent = 0.0
egory_index ]["is_open"] self.account_categories = new_categories @rx.event def set_graph_range(self, value: str): """Set the time range for the net worth graph.""" if value in self.graph_ranges: self.selected_graph_range = value else: pas...
else: self.net_worth_change_percent = 0.0 else: self.net_worth_change_amount = 0.0 self.net_worth_change_percent = 0.0 new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categor...
self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, )
t worth graph.""" if value in self.graph_ranges: self.selected_graph_range = value else: pass @rx.event def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view...
else: self.net_worth_change_amount = 0.0 self.net_worth_change_percent = 0.0 new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accou...
self.net_worth_change_percent = 0.0
self.selected_graph_range = value else: pass @rx.event def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """P...
self.net_worth_change_percent = 0.0 new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 ...
self.net_worth_change_amount = 0.0
else: pass @rx.event def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account data. Sim...
new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balan...
self.net_worth_change_percent = 0.0
def set_summary_view(self, view: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = g...
total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balance"] for account...
new_categories = []
iew: str): """Set the summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() ...
total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balance"] for account_dict in category["accounts"]...
total_assets_val = 0
summary view to Totals or Percent.""" if view in ["Totals", "Percent"]: self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data...
for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balance"] for account_dict in category["accounts"]: account = accoun...
total_liabilities_val = 0
self.summary_view = view @rx.event def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: ...
new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balance"] for account_dict in category["accounts"]: account = account_dict.copy() change_factor = random.uniform(0.98, 1.02) prev_bala...
category = category_dict.copy()
def refresh_all(self): """Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value = new_data[-31]["v...
category_balance_change = 0 category_opening_balance = category["total_balance"] for account_dict in category["accounts"]: account = account_dict.copy() change_factor = random.uniform(0.98, 1.02) prev_balance = account["balance"] ...
new_accounts = []
"""Placeholder for refreshing all account data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_wo...
category_opening_balance = category["total_balance"] for account_dict in category["accounts"]: account = account_dict.copy() change_factor = random.uniform(0.98, 1.02) prev_balance = account["balance"] new_balance = round(prev_bala...
category_balance_change = 0
unt data. Simulates data changes.""" new_data = generate_net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth...
for account_dict in category["accounts"]: account = account_dict.copy() change_factor = random.uniform(0.98, 1.02) prev_balance = account["balance"] new_balance = round(prev_balance * change_factor, 2) account["balance"] = new_...
category_opening_balance = category["total_balance"]
net_worth_data() self._raw_net_worth_data = new_data self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: ...
category["accounts"] = new_accounts new_category_total_balance = ( category_opening_balance + category_balance_change ) category["total_balance"] = round(new_category_total_balance, 2) category["one_month_change"] = round( cate...
for account_dict in category["accounts"]: account = account_dict.copy() change_factor = random.uniform(0.98, 1.02) prev_balance = account["balance"] new_balance = round(prev_balance * change_factor, 2) account["balance"] = new_balance ...
ta self.net_worth = new_data[-1]["value"] if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( ...
change_factor = random.uniform(0.98, 1.02) prev_balance = account["balance"] new_balance = round(prev_balance * change_factor, 2) account["balance"] = new_balance new_sparkline = account["sparkline_data"][-5:] + [ {"val...
account = account_dict.copy()
e"] if len(new_data) > 30: month_ago_value = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / mon...
prev_balance = account["balance"] new_balance = round(prev_balance * change_factor, 2) account["balance"] = new_balance new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ] account...
change_factor = random.uniform(0.98, 1.02)
lue = new_data[-31]["value"] self.net_worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, ...
new_balance = round(prev_balance * change_factor, 2) account["balance"] = new_balance new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ] account["sparkline_data"] = new_sparkline ...
prev_balance = account["balance"]
worth_change_amount = round(self.net_worth - month_ago_value, 2) if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, ) else: self.net_worth...
account["balance"] = new_balance new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ] account["sparkline_data"] = new_sparkline account["last_updated"] = "Just now" new_accounts.ap...
new_balance = round(prev_balance * change_factor, 2)
if month_ago_value != 0: self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, ) else: self.net_worth_change_percent = 0.0 else: self.net_worth_change...
new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ] account["sparkline_data"] = new_sparkline account["last_updated"] = "Just now" new_accounts.append(account) balance_diff = new_...
account["balance"] = new_balance
self.net_worth_change_percent = round( self.net_worth_change_amount / month_ago_value * 100, 1, ) else: self.net_worth_change_percent = 0.0 else: self.net_worth_change_amount = 0.0 self.net_worth_change_p...
account["sparkline_data"] = new_sparkline account["last_updated"] = "Just now" new_accounts.append(account) balance_diff = new_balance - prev_balance category_balance_change += balance_diff category["accounts"] = new_accounts ...
new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ]
1, ) else: self.net_worth_change_percent = 0.0 else: self.net_worth_change_amount = 0.0 self.net_worth_change_percent = 0.0 new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dic...
account["last_updated"] = "Just now" new_accounts.append(account) balance_diff = new_balance - prev_balance category_balance_change += balance_diff category["accounts"] = new_accounts new_category_total_balance = ( ...
account["sparkline_data"] = new_sparkline
self.net_worth_change_percent = 0.0 else: self.net_worth_change_amount = 0.0 self.net_worth_change_percent = 0.0 new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = categ...
new_accounts.append(account) balance_diff = new_balance - prev_balance category_balance_change += balance_diff category["accounts"] = new_accounts new_category_total_balance = ( category_opening_balance + category_balance_change ...
account["last_updated"] = "Just now"
self.net_worth_change_percent = 0.0 new_categories = [] total_assets_val = 0 total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 ...
category_balance_change += balance_diff category["accounts"] = new_accounts new_category_total_balance = ( category_opening_balance + category_balance_change ) category["total_balance"] = round(new_category_total_balance, 2) ca...
balance_diff = new_balance - prev_balance
total_liabilities_val = 0 for category_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balance"] for account_dict in category["accounts"]: ...
new_category_total_balance = ( category_opening_balance + category_balance_change ) category["total_balance"] = round(new_category_total_balance, 2) category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1...
category["accounts"] = new_accounts
ry_dict in self.account_categories: category = category_dict.copy() new_accounts = [] category_balance_change = 0 category_opening_balance = category["total_balance"] for account_dict in category["accounts"]: account = account_dict.copy() ...
category["total_balance"] = round(new_category_total_balance, 2) category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, ) prev_month_balance_approx = ( category["total_balance"] - ...
new_category_total_balance = ( category_opening_balance + category_balance_change )
tegory_balance_change = 0 category_opening_balance = category["total_balance"] for account_dict in category["accounts"]: account = account_dict.copy() change_factor = random.uniform(0.98, 1.02) prev_balance = account["balance"] new_...
category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, ) prev_month_balance_approx = ( category["total_balance"] - category["one_month_change"] ) if prev_month_balance_...
category["total_balance"] = round(new_category_total_balance, 2)
tal_balance"] for account_dict in category["accounts"]: account = account_dict.copy() change_factor = random.uniform(0.98, 1.02) prev_balance = account["balance"] new_balance = round(prev_balance * change_factor, 2) account["bal...
prev_month_balance_approx = ( category["total_balance"] - category["one_month_change"] ) if prev_month_balance_approx != 0: category["one_month_change_percent"] = round( category["one_month_change"] / prev_month_balance_approx * 10...
category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, )
form(0.98, 1.02) prev_balance = account["balance"] new_balance = round(prev_balance * change_factor, 2) account["balance"] = new_balance new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ] ...
if prev_month_balance_approx != 0: category["one_month_change_percent"] = round( category["one_month_change"] / prev_month_balance_approx * 100, 1, ) else: category["one_month_change_percent"] = 0.0 ...
prev_month_balance_approx = ( category["total_balance"] - category["one_month_change"] )
or, 2) account["balance"] = new_balance new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ] account["sparkline_data"] = new_sparkline account["last_updated"] = "Just now" new_accou...
if category["category_name"] == "Credit Cards": total_liabilities_val += abs(category["total_balance"]) else: total_assets_val += category["total_balance"] new_categories.append(category) self.account_categories = new_categories new_as...
if prev_month_balance_approx != 0: category["one_month_change_percent"] = round( category["one_month_change"] / prev_month_balance_approx * 100, 1, ) else: category["one_month_change_percent"] = 0.0
ance new_sparkline = account["sparkline_data"][-5:] + [ {"value": new_balance} ] account["sparkline_data"] = new_sparkline account["last_updated"] = "Just now" new_accounts.append(account) balance_diff = ...
else: category["one_month_change_percent"] = 0.0 if category["category_name"] == "Credit Cards": total_liabilities_val += abs(category["total_balance"]) else: total_assets_val += category["total_balance"] new_categories.app...
category["one_month_change_percent"] = round( category["one_month_change"] / prev_month_balance_approx * 100, 1, )
account["last_updated"] = "Just now" new_accounts.append(account) balance_diff = new_balance - prev_balance category_balance_change += balance_diff category["accounts"] = new_accounts new_category_total_balance = ( category_openin...
if category["category_name"] == "Credit Cards": total_liabilities_val += abs(category["total_balance"]) else: total_assets_val += category["total_balance"] new_categories.append(category) self.account_categories = new_categories new_as...
category["one_month_change_percent"] = 0.0
new_accounts.append(account) balance_diff = new_balance - prev_balance category_balance_change += balance_diff category["accounts"] = new_accounts new_category_total_balance = ( category_opening_balance + category_balance_change ) ...
new_categories.append(category) self.account_categories = new_categories new_assets_summary = [] for item in self.assets_summary: item_copy = item.copy() matching_category = next( ( cat for cat in new_ca...
if category["category_name"] == "Credit Cards": total_liabilities_val += abs(category["total_balance"]) else: total_assets_val += category["total_balance"]
tegory_opening_balance + category_balance_change ) category["total_balance"] = round(new_category_total_balance, 2) category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, ) prev_month_b...
new_assets_summary = [] for item in self.assets_summary: item_copy = item.copy() matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), ...
self.account_categories = new_categories
) category["total_balance"] = round(new_category_total_balance, 2) category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, ) prev_month_balance_approx = ( category["total...
for item in self.assets_summary: item_copy = item.copy() matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, ...
new_assets_summary = []
ry["total_balance"] = round(new_category_total_balance, 2) category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, ) prev_month_balance_approx = ( category["total_balance"] - category["one_month...
self.assets_summary = new_assets_summary new_liabilities_summary = [] cc_category = next( (cat for cat in new_categories if cat["category_name"] == "Credit Cards"), None, ) cc_total = abs(cc_category["total_balance"]) if cc_category else 0 for ite...
for item in self.assets_summary: item_copy = item.copy() matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, ) ...
l_balance, 2) category["one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, ) prev_month_balance_approx = ( category["total_balance"] - category["one_month_change"] ) if prev_m...
matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, ) if matching_category: item_copy["value"] = ma...
item_copy = item.copy()
one_month_change"] = round( category["one_month_change"] * random.uniform(0.9, 1.1), 2, ) prev_month_balance_approx = ( category["total_balance"] - category["one_month_change"] ) if prev_month_balance_approx != 0: ...
if matching_category: item_copy["value"] = matching_category["total_balance"] else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.99, 1.01), 2, ) new_assets_summary.append(ite...
matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, )
"] ) if prev_month_balance_approx != 0: category["one_month_change_percent"] = round( category["one_month_change"] / prev_month_balance_approx * 100, 1, ) else: category["one_month_change_percent"...
new_assets_summary.append(item_copy) self.assets_summary = new_assets_summary new_liabilities_summary = [] cc_category = next( (cat for cat in new_categories if cat["category_name"] == "Credit Cards"), None, ) cc_total = abs(cc_category["total...
if matching_category: item_copy["value"] = matching_category["total_balance"] else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.99, 1.01), 2, )
onth_balance_approx != 0: category["one_month_change_percent"] = round( category["one_month_change"] / prev_month_balance_approx * 100, 1, ) else: category["one_month_change_percent"] = 0.0 if category["categ...
else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.99, 1.01), 2, ) new_assets_summary.append(item_copy) self.assets_summary = new_assets_summary new_liabilities_summary = [] cc_c...
item_copy["value"] = matching_category["total_balance"]
category["one_month_change"] / prev_month_balance_approx * 100, 1, ) else: category["one_month_change_percent"] = 0.0 if category["category_name"] == "Credit Cards": total_liabilities_val += abs(category["total...
new_assets_summary.append(item_copy) self.assets_summary = new_assets_summary new_liabilities_summary = [] cc_category = next( (cat for cat in new_categories if cat["category_name"] == "Credit Cards"), None, ) cc_total = abs(cc_category["total...
item_copy["value"] = round( item_copy["value"] * random.uniform(0.99, 1.01), 2, )
0.0 if category["category_name"] == "Credit Cards": total_liabilities_val += abs(category["total_balance"]) else: total_assets_val += category["total_balance"] new_categories.append(category) self.account_categories = new_categories ne...
new_liabilities_summary = [] cc_category = next( (cat for cat in new_categories if cat["category_name"] == "Credit Cards"), None, ) cc_total = abs(cc_category["total_balance"]) if cc_category else 0 for item in self.liabilities_summary: item_c...
self.assets_summary = new_assets_summary
"Credit Cards": total_liabilities_val += abs(category["total_balance"]) else: total_assets_val += category["total_balance"] new_categories.append(category) self.account_categories = new_categories new_assets_summary = [] for item in self.as...
cc_category = next( (cat for cat in new_categories if cat["category_name"] == "Credit Cards"), None, ) cc_total = abs(cc_category["total_balance"]) if cc_category else 0 for item in self.liabilities_summary: item_copy = item.copy() if item...
new_liabilities_summary = []
_liabilities_val += abs(category["total_balance"]) else: total_assets_val += category["total_balance"] new_categories.append(category) self.account_categories = new_categories new_assets_summary = [] for item in self.assets_summary: item_copy =...
cc_total = abs(cc_category["total_balance"]) if cc_category else 0 for item in self.liabilities_summary: item_copy = item.copy() if item_copy["name"] == "Credit Cards": item_copy["value"] = cc_total else: item_copy["value"] = round( ...
cc_category = next( (cat for cat in new_categories if cat["category_name"] == "Credit Cards"), None, )
new_categories.append(category) self.account_categories = new_categories new_assets_summary = [] for item in self.assets_summary: item_copy = item.copy() matching_category = next( ( cat for cat in new_categories ...
for item in self.liabilities_summary: item_copy = item.copy() if item_copy["name"] == "Credit Cards": item_copy["value"] = cc_total else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.995, 1.005), ...
cc_total = abs(cc_category["total_balance"]) if cc_category else 0
ories new_assets_summary = [] for item in self.assets_summary: item_copy = item.copy() matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ...
self.liabilities_summary = new_liabilities_summary yield rx.toast.info("Data refreshed (simulated)") @rx.event def add_account(self): """Placeholder for adding a new account.""" yield rx.toast.warning("Add Account functionality not implemented yet.")
for item in self.liabilities_summary: item_copy = item.copy() if item_copy["name"] == "Credit Cards": item_copy["value"] = cc_total else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.995, 1.005), ...
item in self.assets_summary: item_copy = item.copy() matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, ) ...
if item_copy["name"] == "Credit Cards": item_copy["value"] = cc_total else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.995, 1.005), 2, ) new_liabilities_summary.append(item...
item_copy = item.copy()
item_copy = item.copy() matching_category = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, ) if matching_category: ...
new_liabilities_summary.append(item_copy) self.liabilities_summary = new_liabilities_summary yield rx.toast.info("Data refreshed (simulated)") @rx.event def add_account(self): """Placeholder for adding a new account.""" yield rx.toast.warning("Add Account functional...
if item_copy["name"] == "Credit Cards": item_copy["value"] = cc_total else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.995, 1.005), 2, )
ry = next( ( cat for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, ) if matching_category: item_copy["value"] = matching_category["total_balan...
else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.995, 1.005), 2, ) new_liabilities_summary.append(item_copy) self.liabilities_summary = new_liabilities_summary yield rx.toast.info("Dat...
item_copy["value"] = cc_total
for cat in new_categories if cat["category_name"] == item_copy["name"] ), None, ) if matching_category: item_copy["value"] = matching_category["total_balance"] else: item_copy["value"] = roun...
new_liabilities_summary.append(item_copy) self.liabilities_summary = new_liabilities_summary yield rx.toast.info("Data refreshed (simulated)") @rx.event def add_account(self): """Placeholder for adding a new account.""" yield rx.toast.warning("Add Account functional...
item_copy["value"] = round( item_copy["value"] * random.uniform(0.995, 1.005), 2, )
item_copy["value"] = matching_category["total_balance"] else: item_copy["value"] = round( item_copy["value"] * random.uniform(0.99, 1.01), 2, ) new_assets_summary.append(item_copy) self.assets_summary = new_assets...
yield rx.toast.info("Data refreshed (simulated)") @rx.event def add_account(self): """Placeholder for adding a new account.""" yield rx.toast.warning("Add Account functionality not implemented yet.")
self.liabilities_summary = new_liabilities_summary
item_copy["value"] * random.uniform(0.99, 1.01), 2, ) new_assets_summary.append(item_copy) self.assets_summary = new_assets_summary new_liabilities_summary = [] cc_category = next( (cat for cat in new_categories if cat["cat...
def add_account(self): """Placeholder for adding a new account.""" yield rx.toast.warning("Add Account functionality not implemented yet.")
import reflex.components.radix.themes as rdxt from admin_dashboard.components.customer_details import customer_details from admin_dashboard.components.data_table import data_table from admin_dashboard.components.navigation import navigation def index() -> rx.Component: """The main page layout for the dashboard....
import reflex as rx
import reflex as rx
from admin_dashboard.components.customer_details import customer_details from admin_dashboard.components.data_table import data_table from admin_dashboard.components.navigation import navigation def index() -> rx.Component: """The main page layout for the dashboard.""" return rdxt.theme( rx.el.div( ...
import reflex.components.radix.themes as rdxt
import reflex as rx import reflex.components.radix.themes as rdxt
from admin_dashboard.components.data_table import data_table from admin_dashboard.components.navigation import navigation def index() -> rx.Component: """The main page layout for the dashboard.""" return rdxt.theme( rx.el.div( navigation(), rx.el.div( data_tabl...
from admin_dashboard.components.customer_details import customer_details
import reflex as rx import reflex.components.radix.themes as rdxt from admin_dashboard.components.customer_details import customer_details
from admin_dashboard.components.navigation import navigation def index() -> rx.Component: """The main page layout for the dashboard.""" return rdxt.theme( rx.el.div( navigation(), rx.el.div( data_table(), customer_details(), clas...
from admin_dashboard.components.data_table import data_table
import reflex as rx import reflex.components.radix.themes as rdxt from admin_dashboard.components.customer_details import customer_details from admin_dashboard.components.data_table import data_table
def index() -> rx.Component: """The main page layout for the dashboard.""" return rdxt.theme( rx.el.div( navigation(), rx.el.div( data_table(), customer_details(), class_name="grid grid-cols-1 md:grid-cols-3", ), ...
from admin_dashboard.components.navigation import navigation
: """The main page layout for the dashboard.""" return rdxt.theme( rx.el.div( navigation(), rx.el.div( data_table(), customer_details(), class_name="grid grid-cols-1 md:grid-cols-3", ), class_name="bg-gray-10...
def hr_portal_page() -> rx.Component: """Mock HR Portal page.""" return mock_page("HR Portal") def customer_success_hub_page() -> rx.Component: """Mock Customer Success Hub page.""" return mock_page("Customer Success Hub") app = rx.App(theme=rx.theme(appearance="light"), stylesheets=[]) app.add_p...
def sales_pipeline_page() -> rx.Component: """Mock Sales Pipeline page.""" return mock_page("Sales Pipeline")
rx.el.div( data_table(), customer_details(), class_name="grid grid-cols-1 md:grid-cols-3", ), class_name="bg-gray-100 w-full h-screen", ), appearance="light", ) def mock_page(title: str) -> rx.Component: """Cre...
def customer_success_hub_page() -> rx.Component: """Mock Customer Success Hub page.""" return mock_page("Customer Success Hub") app = rx.App(theme=rx.theme(appearance="light"), stylesheets=[]) app.add_page(index, route="/") app.add_page(sales_pipeline_page, route="/sales-pipeline") app.add_page(hr_portal_p...
def hr_portal_page() -> rx.Component: """Mock HR Portal page.""" return mock_page("HR Portal")
class_name="grid grid-cols-1 md:grid-cols-3", ), class_name="bg-gray-100 w-full h-screen", ), appearance="light", ) def mock_page(title: str) -> rx.Component: """Creates a simple mock page layout.""" return rdxt.theme( rx.el.div( navigation(), ...
app = rx.App(theme=rx.theme(appearance="light"), stylesheets=[]) app.add_page(index, route="/") app.add_page(sales_pipeline_page, route="/sales-pipeline") app.add_page(hr_portal_page, route="/hr-portal") app.add_page(customer_success_hub_page, route="/customer-success-hub")
def customer_success_hub_page() -> rx.Component: """Mock Customer Success Hub page.""" return mock_page("Customer Success Hub")
arance="light", ) def mock_page(title: str) -> rx.Component: """Creates a simple mock page layout.""" return rdxt.theme( rx.el.div( navigation(), rx.el.div( rx.el.h1( title, class_name="text-2xl font-bold mb-4 text-gra...
app.add_page(index, route="/") app.add_page(sales_pipeline_page, route="/sales-pipeline") app.add_page(hr_portal_page, route="/hr-portal") app.add_page(customer_success_hub_page, route="/customer-success-hub")
app = rx.App(theme=rx.theme(appearance="light"), stylesheets=[])
import reflex.components.recharts as recharts from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, ) def detail_item(label: str, value: rx.Var[str]) -> rx.Component: """Displays a single detail item with label and value.""" return rx.el.div( rx.el.dt( ...
import reflex as rx
import reflex as rx
from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, ) def detail_item(label: str, value: rx.Var[str]) -> rx.Component: """Displays a single detail item with label and value.""" return rx.el.div( rx.el.dt( label, class_name="text-sm font-...
import reflex.components.recharts as recharts
import reflex as rx import reflex.components.recharts as recharts
def detail_item(label: str, value: rx.Var[str]) -> rx.Component: """Displays a single detail item with label and value.""" return rx.el.div( rx.el.dt( label, class_name="text-sm font-medium text-gray-500", ), rx.el.dd(value, class_name="mt-1 text-sm text-gray-9...
from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, )
import reflex as rx import reflex.components.recharts as recharts from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, )
def license_stat(label: str, value: rx.Var[int], change: rx.Var[int]) -> rx.Component: """Displays a license statistic card.""" return rx.el.div( rx.el.p( label, class_name="text-sm font-medium text-gray-500", ), rx.el.div( rx.el.span( ...
def detail_item(label: str, value: rx.Var[str]) -> rx.Component: """Displays a single detail item with label and value.""" return rx.el.div( rx.el.dt( label, class_name="text-sm font-medium text-gray-500", ), rx.el.dd(value, class_name="mt-1 text-sm text-gray-900"...
class_name="text-3xl font-bold text-gray-900 mr-2", ), rx.el.span( rx.icon( rx.cond(change > 0, "arrow-up", "arrow-down"), size=16, class_name="mr-1", ), rx.cond(change < 0...
return rx.el.div( rx.el.h3( customer["customer_name"], class_name="text-xl font-semibold text-gray-900 mb-4", ), rx.el.div( rx.el.h4( "Usage", class_name="text-md font-medium text-gray-700 mb-2", ), ...
usage_percentage = rx.cond( customer["licenses"] > 0, round(customer["active_licenses"] * 100 / customer["licenses"]).to(int), 0, )
import reflex as rx from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, SortColumn, ) def platform_tag(platform: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the platform.""" return rx.el.span( platform, class_name=rx.match( ...
from typing import Optional, Tuple
from typing import Optional, Tuple
from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, SortColumn, ) def platform_tag(platform: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the platform.""" return rx.el.span( platform, class_name=rx.match( platform, ...
import reflex as rx
from typing import Optional, Tuple import reflex as rx
def platform_tag(platform: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the platform.""" return rx.el.span( platform, class_name=rx.match( platform, ( "Windows", "px-2 py-1 text-xs font-medium rounded-full bg-blue-100 ...
from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, SortColumn, )
from typing import Optional, Tuple import reflex as rx from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, SortColumn, )
def industry_tag(industry: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the industry.""" return rx.el.span( industry, class_name=rx.match( industry, ( "Finance", "px-2 py-1 text-xs font-medium rounded-full bg-pink-100 ...
def platform_tag(platform: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the platform.""" return rx.el.span( platform, class_name=rx.match( platform, ( "Windows", "px-2 py-1 text-xs font-medium rounded-full bg-blue-100 tex...
from typing import Optional, Tuple import reflex as rx from admin_dashboard.states.dashboard_state import ( CustomerData, DashboardState, SortColumn, ) def platform_tag(platform: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the platform.""" return rx.el.span( platform,...
def sort_icon(column_key: SortColumn) -> rx.Component: """Displays sort direction icon or a neutral sortable indicator.""" icon_base_class = ( "ml-1 inline-block w-3 h-3 transition-colors duration-150 ease-in-out" ) active_icon_class = f"{icon_base_class} text-gray-700" inactive_icon_clas...
def industry_tag(industry: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the industry.""" return rx.el.span( industry, class_name=rx.match( industry, ( "Finance", "px-2 py-1 text-xs font-medium rounded-full bg-pink-100 tex...
( "iOS", "px-2 py-1 text-xs font-medium rounded-full bg-yellow-100 text-yellow-800", ), "px-2 py-1 text-xs font-medium rounded-full bg-gray-100 text-gray-800", ), ) def industry_tag(industry: rx.Var[str]) -> rx.Component: """Renders ...
def sortable_table_header(col_name: str, column_key: SortColumn) -> rx.Component: """Renders a sortable table header cell.""" base_class = "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider group" sortable_class = f"{base_class} cursor-pointer" text_align_class = rx.match...
def sort_icon(column_key: SortColumn) -> rx.Component: """Displays sort direction icon or a neutral sortable indicator.""" icon_base_class = ( "ml-1 inline-block w-3 h-3 transition-colors duration-150 ease-in-out" ) active_icon_class = f"{icon_base_class} text-gray-700" inactive_icon_class =...
), "px-2 py-1 text-xs font-medium rounded-full bg-gray-100 text-gray-800", ), ) def industry_tag(industry: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the industry.""" return rx.el.span( industry, class_name=rx.match( industry,...
active_icon_class = f"{icon_base_class} text-gray-700" inactive_icon_class = f"{icon_base_class} text-gray-400 group-hover:text-gray-600" is_active_column = DashboardState.sort_column == column_key return rx.cond( is_active_column, rx.cond( DashboardState.sort_order == "asc"...
icon_base_class = ( "ml-1 inline-block w-3 h-3 transition-colors duration-150 ease-in-out" )
) def industry_tag(industry: rx.Var[str]) -> rx.Component: """Renders a colored tag based on the industry.""" return rx.el.span( industry, class_name=rx.match( industry, ( "Finance", "px-2 py-1 text-xs font-medium rounded-full bg-pink...
inactive_icon_class = f"{icon_base_class} text-gray-400 group-hover:text-gray-600" is_active_column = DashboardState.sort_column == column_key return rx.cond( is_active_column, rx.cond( DashboardState.sort_order == "asc", rx.icon( "arrow-up", ...
active_icon_class = f"{icon_base_class} text-gray-700"
nent: """Renders a colored tag based on the industry.""" return rx.el.span( industry, class_name=rx.match( industry, ( "Finance", "px-2 py-1 text-xs font-medium rounded-full bg-pink-100 text-pink-800", ), ( ...
is_active_column = DashboardState.sort_column == column_key return rx.cond( is_active_column, rx.cond( DashboardState.sort_order == "asc", rx.icon( "arrow-up", size=12, class_name=active_icon_class, ), ...
inactive_icon_class = f"{icon_base_class} text-gray-400 group-hover:text-gray-600"
industry, class_name=rx.match( industry, ( "Finance", "px-2 py-1 text-xs font-medium rounded-full bg-pink-100 text-pink-800", ), ( "Healthcare", "px-2 py-1 text-xs font-medium rounded-full bg-pur...
return rx.cond( is_active_column, rx.cond( DashboardState.sort_order == "asc", rx.icon( "arrow-up", size=12, class_name=active_icon_class, ), rx.icon( "arrow-down", size=1...
is_active_column = DashboardState.sort_column == column_key
table indicator.""" icon_base_class = ( "ml-1 inline-block w-3 h-3 transition-colors duration-150 ease-in-out" ) active_icon_class = f"{icon_base_class} text-gray-700" inactive_icon_class = f"{icon_base_class} text-gray-400 group-hover:text-gray-600" is_active_column = DashboardState.sort_co...
sortable_class = f"{base_class} cursor-pointer" text_align_class = rx.match( col_name, ("Revenue", "text-right"), ("Licenses", "text-center"), ("Active licenses", "text-center"), "text-left", ) justify_content_val = rx.match( col_name, ("Revenue",...
base_class = "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider group"
n-150 ease-in-out" ) active_icon_class = f"{icon_base_class} text-gray-700" inactive_icon_class = f"{icon_base_class} text-gray-400 group-hover:text-gray-600" is_active_column = DashboardState.sort_column == column_key return rx.cond( is_active_column, rx.cond( DashboardS...
text_align_class = rx.match( col_name, ("Revenue", "text-right"), ("Licenses", "text-center"), ("Active licenses", "text-center"), "text-left", ) justify_content_val = rx.match( col_name, ("Revenue", "flex-end"), ("Licenses", "center"), ...
sortable_class = f"{base_class} cursor-pointer"