add default category and default category frontend ui

This commit is contained in:
MaysWind
2020-12-01 01:06:35 +08:00
parent d165eb4d34
commit a6c3f2fe48
8 changed files with 840 additions and 34 deletions
+449
View File
@@ -0,0 +1,449 @@
const defaultExpenseCategories = [
{
name: 'Food & Drink',
categoryIconId: '1',
color: 'ff6b22',
subCategories: [
{
name: 'Food',
categoryIconId: '2',
color: 'ff6b22'
},
{
name: 'Drink',
categoryIconId: '30',
color: 'ff6b22'
},
{
name: 'Fruit & Snack',
categoryIconId: '70',
color: 'ff6b22'
}
]
},
{
name: 'Clothing & Appearance',
categoryIconId: '100',
color: '673ab7',
subCategories: [
{
name: 'Clothing',
categoryIconId: '110',
color: '673ab7'
},
{
name: 'Jewelry',
categoryIconId: '170',
color: '673ab7'
},
{
name: 'Cosmetic',
categoryIconId: '180',
color: '673ab7'
},
{
name: 'Hair Cuts & Salon',
categoryIconId: '190',
color: '673ab7'
}
]
},
{
name: 'Housing & Houseware',
categoryIconId: '200',
color: '000000',
subCategories: [
{
name: 'Houseware',
categoryIconId: '210',
color: '000000'
},
{
name: 'Electronics',
categoryIconId: '230',
color: '000000'
},
{
name: 'Repairs & Maintenance',
categoryIconId: '250',
color: '000000'
},
{
name: 'Housekeeping Services',
categoryIconId: '260',
color: '000000'
},
{
name: 'Utilities Expense',
categoryIconId: '270',
color: '000000'
},
{
name: 'Rent & Mortgage',
categoryIconId: '290',
color: '000000'
}
]
},
{
name: 'Transportation',
categoryIconId: '300',
color: '009688',
subCategories: [
{
name: 'Public Transit',
categoryIconId: '310',
color: '009688'
},
{
name: 'Taxi & Car Rental',
categoryIconId: '320',
color: '009688'
},
{
name: 'Personal Car Expense',
categoryIconId: '330',
color: '009688'
},
{
name: 'Train Tickets',
categoryIconId: '370',
color: '009688'
},
{
name: 'Airline Tickets',
categoryIconId: '390',
color: '009688'
}
]
},
{
name: 'Communication',
categoryIconId: '400',
color: '2196f3',
subCategories: [
{
name: 'Telephone Bill',
categoryIconId: '420',
color: '2196f3'
},
{
name: 'Internet Bill',
categoryIconId: '430',
color: '2196f3'
},
{
name: 'Express Fee',
categoryIconId: '480',
color: '2196f3'
}
]
},
{
name: 'Entertainment',
categoryIconId: '500',
color: 'ff2d55',
subCategories: [
{
name: 'Sports & Fitness',
categoryIconId: '510',
color: 'ff2d55'
},
{
name: 'Party Expense',
categoryIconId: '540',
color: 'ff2d55'
},
{
name: 'Movies & Shows',
categoryIconId: '550',
color: 'ff2d55'
},
{
name: 'Toys & Games',
categoryIconId: '560',
color: 'ff2d55'
},
{
name: 'Subscriptions',
categoryIconId: '570',
color: 'ff2d55'
},
{
name: 'Pet Expense',
categoryIconId: '580',
color: 'ff2d55'
},
{
name: 'Travelling',
categoryIconId: '590',
color: 'ff2d55'
}
]
},
{
name: 'Education & Studying',
categoryIconId: '600',
color: 'cddc39',
subCategories: [
{
name: 'Books & Newspaper & Magazines',
categoryIconId: '610',
color: 'cddc39'
},
{
name: 'Training Courses',
categoryIconId: '660',
color: 'cddc39'
},
{
name: 'Certification & Examination',
categoryIconId: '680',
color: 'cddc39'
}
]
},
{
name: 'Gifts & Donations',
categoryIconId: '700',
color: '4cd964',
subCategories: [
{
name: 'Gifts',
categoryIconId: '710',
color: '4cd964'
},
{
name: 'Donations',
categoryIconId: '780',
color: '4cd964'
}
]
},
{
name: 'Medical & Healthcare',
categoryIconId: '800',
color: 'ff3b30',
subCategories: [
{
name: 'Diagnosis & Treatment',
categoryIconId: '840',
color: 'ff3b30'
},
{
name: 'Medications',
categoryIconId: '860',
color: 'ff3b30'
},
{
name: 'Medical Devices',
categoryIconId: '890',
color: 'ff3b30'
}
]
},
{
name: 'Finance & Insurance',
categoryIconId: '900',
color: 'ff9500',
subCategories: [
{
name: 'Tax Expense',
categoryIconId: '910',
color: 'ff9500'
},
{
name: 'Service Charge',
categoryIconId: '930',
color: 'ff9500'
},
{
name: 'Insurance Expense',
categoryIconId: '950',
color: 'ff9500'
},
{
name: 'Interest Expense',
categoryIconId: '970',
color: 'ff9500'
},
{
name: 'Compensation & Fine',
categoryIconId: '990',
color: 'ff9500'
}
]
},
{
name: 'Miscellaneous',
categoryIconId: '1000',
color: '8e8e93',
subCategories: [
{
name: 'Other Expense',
categoryIconId: '1010',
color: '8e8e93'
}
]
}
];
const defaultIncomeCategories = [
{
name: 'Occupational Earnings',
categoryIconId: '2000',
color: 'ff6b22',
subCategories: [
{
name: 'Salary Income',
categoryIconId: '2010',
color: 'ff6b22'
},
{
name: 'Bonus Income',
categoryIconId: '2020',
color: 'ff6b22'
},
{
name: 'Overtime Pay',
categoryIconId: '231',
color: 'ff6b22'
},
{
name: 'Side Job Income',
categoryIconId: '2080',
color: 'ff6b22'
}
]
},
{
name: 'Finance & Investment',
categoryIconId: '900',
color: 'ff9500',
subCategories: [
{
name: 'Investment Income',
categoryIconId: '2100',
color: 'ff9500'
},
{
name: 'Rental Income',
categoryIconId: '290',
color: 'ff9500'
},
{
name: 'Interest Income',
categoryIconId: '970',
color: 'ff9500'
}
]
},
{
name: 'Miscellaneous',
categoryIconId: '1000',
color: '8e8e93',
subCategories: [
{
name: 'Gift & Lucky Money',
categoryIconId: '710',
color: '8e8e93'
},
{
name: 'Winnings Income',
categoryIconId: '564',
color: '8e8e93'
},
{
name: 'Windfall',
categoryIconId: '5200',
color: '8e8e93'
},
{
name: 'Other Income',
categoryIconId: '3010',
color: '8e8e93'
}
]
}
];
const defaultTransferCategories = [
{
name: 'General Transfer',
categoryIconId: '4000',
color: 'ff6b22',
subCategories: [
{
name: 'Bank Transfer',
categoryIconId: '900',
color: 'ff6b22'
},
{
name: 'Credit Card Repayment',
categoryIconId: '980',
color: 'ff6b22'
},
{
name: 'Deposits & Withdrawals',
categoryIconId: '981',
color: 'ff6b22'
}
]
},
{
name: 'Loan & Debt',
categoryIconId: '950',
color: 'ff9500',
subCategories: [
{
name: 'Borrowing Money',
categoryIconId: '910',
color: 'ff9500'
},
{
name: 'Lending Money',
categoryIconId: '290',
color: 'ff9500'
},
{
name: 'Repayment',
categoryIconId: '930',
color: 'ff9500'
},
{
name: 'Debt Collection',
categoryIconId: '5030',
color: 'ff9500'
}
]
},
{
name: 'Miscellaneous',
categoryIconId: '1000',
color: '8e8e93',
subCategories: [
{
name: 'Out-of-Pocket Expense',
categoryIconId: '2010',
color: '8e8e93'
},
{
name: 'Reimbursement',
categoryIconId: '920',
color: '8e8e93'
},
{
name: 'Other Transfer',
categoryIconId: '4900',
color: '8e8e93'
}
]
}
];
export default {
defaultExpenseCategories: defaultExpenseCategories,
defaultIncomeCategories: defaultIncomeCategories,
defaultTransferCategories: defaultTransferCategories,
};
+93 -34
View File
@@ -237,6 +237,9 @@ const allCategoryIcons = {
'170': {
icon: 'las la-gem'
},
'171': {
icon: 'las la-ring'
},
'180': {
icon: 'las la-spray-can'
},
@@ -299,7 +302,7 @@ const allCategoryIcons = {
icon: 'las la-tint'
},
'271': {
icon: 'las la-burn'
icon: 'las la-fire'
},
'290': {
icon: 'las la-file-invoice'
@@ -497,6 +500,9 @@ const allCategoryIcons = {
icon: 'las la-dice-d6'
},
'564': {
icon: 'las la-dice'
},
'565': {
icon: 'las la-chess'
},
'570': {
@@ -521,18 +527,21 @@ const allCategoryIcons = {
icon: 'las la-swimming-pool'
},
'592': {
icon: 'las la-hot-tub'
icon: 'las la-parachute-box'
},
'593': {
icon: 'las la-monument'
icon: 'las la-hot-tub'
},
'594': {
icon: 'las la-mountain'
icon: 'las la-monument'
},
'595': {
icon: 'las la-campground'
icon: 'las la-mountain'
},
'596': {
icon: 'las la-campground'
},
'597': {
icon: 'las la-hotel'
},
'599': {
@@ -613,6 +622,9 @@ const allCategoryIcons = {
'870': {
icon: 'las la-x-ray'
},
'880': {
icon: 'las la-glasses'
},
'890': {
icon: 'las la-thermometer'
},
@@ -641,9 +653,6 @@ const allCategoryIcons = {
'950': {
icon: 'las la-file-invoice-dollar'
},
'951': {
icon: 'las la-file-invoice'
},
'960': {
icon: 'las la-clipboard-check'
},
@@ -653,6 +662,9 @@ const allCategoryIcons = {
'980': {
icon: 'las la-credit-card'
},
'981': {
icon: 'las la-piggy-bank'
},
'990': {
icon: 'las la-gavel'
},
@@ -663,80 +675,127 @@ const allCategoryIcons = {
'1010': {
icon: 'las la-minus-circle'
},
'1020': {
// 2000 - 2099 : Income - Occupational Earnings
'2000': {
icon: 'las la-suitcase'
},
'2010': {
icon: 'las la-wallet'
},
'2020': {
icon: 'las la-trophy'
},
'2021': {
icon: 'las la-medal'
},
'2080': {
icon: 'las la-user-clock'
},
// 2000 - 2099 : Income - Finance & Investment
'2100': {
icon: 'las la-chart-area'
},
'2101': {
icon: 'las la-chart-line'
},
// 3000 - 3999 : Income - Miscellaneous
'3010': {
icon: 'las la-plus-circle'
},
// 4000 - 4099 : Transfer
'4000': {
icon: 'las la-exchange-alt'
},
'4900': {
icon: 'las la-arrow-circle-right'
},
// 5000 - 5999 : Miscellaneous
'5000': {
icon: 'las la-star'
},
'1030': {
'5010': {
icon: 'las la-magic'
},
'5020': {
icon: 'las la-infinity'
},
'5030': {
icon: 'las la-clipboard-list'
},
'5040': {
icon: 'las la-trash-alt'
},
'1040': {
'5050': {
icon: 'las la-weight-hanging'
},
'1100': {
'5100': {
icon: 'las la-shopping-bag'
},
'1101': {
'5101': {
icon: 'las la-shopping-basket'
},
'1102': {
'5102': {
icon: 'las la-shopping-cart'
},
// 5000 - 9999 : Brands
'5000': {
'5200': {
icon: 'las la-money-bill-wave-alt'
},
// 6000 - 9999 : Brands
'6000': {
icon: 'lab la-amazon'
},
'5001': {
'6001': {
icon: 'lab la-ebay'
},
'5100': {
'6100': {
icon: 'lab la-app-store'
},
'5101': {
'6101': {
icon: 'lab la-google-play'
},
'5200': {
'6200': {
icon: 'lab la-windows'
},
'5300': {
'6300': {
icon: 'lab la-kickstarter'
},
'5400': {
'6400': {
icon: 'lab la-uber'
},
'5500': {
'6500': {
icon: 'lab la-fedex'
},
'5501': {
'6501': {
icon: 'lab la-ups'
},
'5502': {
'6502': {
icon: 'lab la-usps'
},
'5503': {
'6503': {
icon: 'lab la-dhl'
},
'6000': {
'7000': {
icon: 'lab la-playstation'
},
'6001': {
'7001': {
icon: 'lab la-xbox'
},
'6100': {
'7100': {
icon: 'lab la-steam'
},
'6200': {
'7200': {
icon: 'lab la-youtube'
},
'6300': {
'7300': {
icon: 'lab la-spotify'
},
'6301': {
'7301': {
icon: 'lab la-itunes'
},
'7000': {
'8000': {
icon: 'lab la-evernote'
},
'8000': {
'8100': {
icon: 'lab la-adobe'
},
'9000': {