Skip to content

Commit 7f150c6

Browse files
committed
add edit category option in settings
1 parent 92695bd commit 7f150c6

19 files changed

Lines changed: 973 additions & 131 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,13 @@ All expenses are stored in the device's **LocalStorage** and reflected immediate
9494

9595
Provides customization and utility options for better personalization:
9696

97-
* 🎨 **Theme Mode Toggle** (Dark / Light)
98-
* ⬇️ **Download Data**: Export your expenses in **PDF**, **JSON**, or **Excel** formats between the selected date range. Users can also choose **All Data** to export all expense records.
99-
* 📤 **Import Data** (upload expense data)
100-
***Add Category** (custom categories for better organization)
101-
***Delete Category** (remove unused or incorrect categories)
102-
* 🔄 **Update App** (Update the application to the latest release)
97+
* 🎨 **Theme Mode Toggle** — Dark / Light
98+
* ⬇️ **Download Data** — Export your expenses in **PDF**, **JSON**, or **Excel** formats between the selected date range. Users can also choose **All Data** to export all expense records.
99+
* 📤 **Import Data** — Upload expense data.
100+
* 🔄 **Update App** — Update the application to the latest release.
101+
***Add Category** — Create custom categories for better organization.
102+
* ✏️ **Edit Category** — Modify existing categories.
103+
***Delete Category** — Remove unused or incorrect categories.
103104

104105
---
105106

documentation/components/DownloadComponentComponent.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,8 +1216,8 @@ <h3 id="inputs">
12161216

12171217
// Fetch data
12181218
const expenseData: Expense[] &#x3D; this.expenseService.searchByDateRange(fromDate, toDate);
1219-
const categoryData: Category[] &#x3D; this.categoryService.getAll();
1220-
const userData: User | {} &#x3D; this.userService.getUserData();
1219+
const categoryData: Category[] &#x3D; this.categoryService.getAll().filter(item &#x3D;&gt; item.user_id !&#x3D; &#x27;0&#x27;);
1220+
const userData: User | null &#x3D; this.userService.getUserData();
12211221
const budgetData: Budget[] &#x3D; this.budgetService.getAll();
12221222

12231223
if (!expenseData || expenseData.length &#x3D;&#x3D;&#x3D; 0) {

documentation/components/SettingsComponent.html

Lines changed: 695 additions & 49 deletions
Large diffs are not rendered by default.

documentation/components/ToastComponent.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,9 @@ <h3 id="methods">
516516

517517
// Define style classes for each toast type
518518
const typeClasses: any &#x3D; {
519-
success: &#x27;bg-green-500&#x27;,
520-
error: &#x27;bg-red-500&#x27;,
521-
info: &#x27;bg-blue-500&#x27;,
519+
success: &#x27;bg-green-500 text-white&#x27;,
520+
error: &#x27;bg-red-500 text-white&#x27;,
521+
info: &#x27;bg-blue-500 text-white&#x27;,
522522
warning: &#x27;bg-yellow-500 text-black&#x27;,
523523
};
524524

documentation/coverage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@
601601
<td>SettingsComponent</td>
602602
<td align="right" data-sort="100">
603603
<span class="coverage-percent">100 %</span>
604-
<span class="coverage-count">(33/33)</span>
604+
<span class="coverage-count">(44/44)</span>
605605
</td>
606606
</tr>
607607
<tr class="very-good">

documentation/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,13 @@ <h3>5. <strong>Budget View</strong></h3>
212212
<h3>6. <strong>Settings View</strong></h3>
213213
<p>Provides customization and utility options for better personalization:</p>
214214
<ul>
215-
<li>🎨 <strong>Theme Mode Toggle</strong> (Dark / Light)</li>
216-
<li>⬇️ <strong>Download Data</strong>: Export your expenses in <strong>PDF</strong>, <strong>JSON</strong>, or <strong>Excel</strong> formats between the selected date range. Users can also choose <strong>All Data</strong> to export all expense records.</li>
217-
<li>📤 <strong>Import Data</strong> (upload expense data)</li>
218-
<li><strong>Add Category</strong> (custom categories for better organization)</li>
219-
<li><strong>Delete Category</strong> (remove unused or incorrect categories)</li>
220-
<li>🔄 <strong>Update App</strong> (Update the application to the latest release)</li>
215+
<li>🎨 <strong>Theme Mode Toggle</strong> — Dark / Light</li>
216+
<li>⬇️ <strong>Download Data</strong> — Export your expenses in <strong>PDF</strong>, <strong>JSON</strong>, or <strong>Excel</strong> formats between the selected date range. Users can also choose <strong>All Data</strong> to export all expense records.</li>
217+
<li>📤 <strong>Import Data</strong> — Upload expense data.</li>
218+
<li>🔄 <strong>Update App</strong> — Update the application to the latest release.</li>
219+
<li><strong>Add Category</strong> — Create custom categories for better organization.</li>
220+
<li>✏️ <strong>Edit Category</strong> — Modify existing categories.</li>
221+
<li><strong>Delete Category</strong> — Remove unused or incorrect categories.</li>
221222
</ul>
222223
<hr>
223224
<h2>📱 Mobile-First Design</h2>

documentation/injectables/UserService.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ <h3 id="methods">
328328
</div>
329329

330330
<div class="io-description">
331-
<b>Returns : </b> <code><a href="../interfaces/User.html" target="_self" >User | literal type</a></code>
331+
<b>Returns : </b> <code><a href="../interfaces/User.html" target="_self" >User | null</a></code>
332332

333333
</div>
334334
<div class="io-description">
@@ -578,8 +578,8 @@ <h3 id="methods">
578578

579579
<tr>
580580
<td class="col-md-4">
581-
<div class="io-line">Defined in <a href="" data-line="123"
582-
class="link-to-prism">src/app/service/localStorage/user.service.ts:123</a></div>
581+
<div class="io-line">Defined in <a href="" data-line="128"
582+
class="link-to-prism">src/app/service/localStorage/user.service.ts:128</a></div>
583583
</td>
584584
</tr>
585585

@@ -750,9 +750,14 @@ <h3 id="methods">
750750
*
751751
* @returns {User | {}} The user object, or empty object if not available.
752752
*/
753-
getUserData(): User | {} {
754-
if (!this.isBrowser()) return {};
755-
return this.storageService.getUser();
753+
getUserData(): User | null {
754+
if (!this.isBrowser()) return null;
755+
const userData &#x3D; this.storageService.getUser();
756+
if (userData) {
757+
const { ai_key, ...safeUser } &#x3D; userData;
758+
return safeUser;
759+
}
760+
return null;
756761
}
757762

758763
/**

documentation/interfaces/User.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -878,9 +878,14 @@ <h3 id="inputs">Properties</h3>
878878
*
879879
* @returns {User | {}} The user object, or empty object if not available.
880880
*/
881-
getUserData(): User | {} {
882-
if (!this.isBrowser()) return {};
883-
return this.storageService.getUser();
881+
getUserData(): User | null {
882+
if (!this.isBrowser()) return null;
883+
const userData &#x3D; this.storageService.getUser();
884+
if (userData) {
885+
const { ai_key, ...safeUser } &#x3D; userData;
886+
return safeUser;
887+
}
888+
return null;
884889
}
885890

886891
/**

documentation/interfaces/userData.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ <h3 id="inputs">Properties</h3>
492492

493493
// Fetch data
494494
const expenseData: Expense[] &#x3D; this.expenseService.searchByDateRange(fromDate, toDate);
495-
const categoryData: Category[] &#x3D; this.categoryService.getAll();
496-
const userData: User | {} &#x3D; this.userService.getUserData();
495+
const categoryData: Category[] &#x3D; this.categoryService.getAll().filter(item &#x3D;&gt; item.user_id !&#x3D; &#x27;0&#x27;);
496+
const userData: User | null &#x3D; this.userService.getUserData();
497497
const budgetData: Budget[] &#x3D; this.budgetService.getAll();
498498

499499
if (!expenseData || expenseData.length &#x3D;&#x3D;&#x3D; 0) {

documentation/js/search/search_index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)