Compare commits
No commits in common. "b26c6ba179b3eca1f276d4149a971cf735846de6" and "d64b4c948a9038fc86e2c9e7a4d0bbc781b45cd8" have entirely different histories.
b26c6ba179
...
d64b4c948a
4 changed files with 8 additions and 51 deletions
|
|
@ -4,8 +4,6 @@ from random import randrange
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
from django.utils.decorators import method_decorator
|
|
||||||
from django.views.decorators.cache import cache_page
|
|
||||||
from drf_yasg import openapi
|
from drf_yasg import openapi
|
||||||
from drf_yasg.utils import swagger_auto_schema
|
from drf_yasg.utils import swagger_auto_schema
|
||||||
from foldbank.models import Account, RecurringPayment, Transaction, User
|
from foldbank.models import Account, RecurringPayment, Transaction, User
|
||||||
|
|
@ -133,7 +131,6 @@ class TransactionsAPI(generics.ListAPIView):
|
||||||
},
|
},
|
||||||
tags=["Transactions"],
|
tags=["Transactions"],
|
||||||
)
|
)
|
||||||
@method_decorator(cache_page(60 * 60 * 2))
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
qs = []
|
qs = []
|
||||||
|
|
||||||
|
|
@ -193,7 +190,6 @@ class AccountsAPI(generics.ListAPIView):
|
||||||
},
|
},
|
||||||
tags=["Accounts"],
|
tags=["Accounts"],
|
||||||
)
|
)
|
||||||
@method_decorator(cache_page(60 * 60 * 2))
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
qs = []
|
qs = []
|
||||||
|
|
||||||
|
|
@ -244,9 +240,8 @@ class UpcomingRecurringPaymentAPI(generics.ListAPIView):
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
success_response = openapi.Response(
|
|
||||||
"Success Response", UpcomingRecurringPaymentOutputSerializer
|
success_response = openapi.Response("Success Response", UpcomingRecurringPaymentOutputSerializer)
|
||||||
)
|
|
||||||
|
|
||||||
@swagger_auto_schema(
|
@swagger_auto_schema(
|
||||||
operation_summary="Recurring Payments List",
|
operation_summary="Recurring Payments List",
|
||||||
|
|
@ -255,7 +250,6 @@ class UpcomingRecurringPaymentAPI(generics.ListAPIView):
|
||||||
},
|
},
|
||||||
tags=["Recurring Payments"],
|
tags=["Recurring Payments"],
|
||||||
)
|
)
|
||||||
@method_decorator(cache_page(60 * 60 * 2))
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
qs = []
|
qs = []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,26 +91,11 @@ export default function CenterCol() {
|
||||||
greet += 'evening'
|
greet += 'evening'
|
||||||
}
|
}
|
||||||
|
|
||||||
const nth = function(d) {
|
|
||||||
if (d > 3 && d < 21) return 'th';
|
|
||||||
switch (d % 10) {
|
|
||||||
case 1: return "st";
|
|
||||||
case 2: return "nd";
|
|
||||||
case 3: return "rd";
|
|
||||||
default: return "th";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const dayName = function(d) {
|
|
||||||
const days = ["Monday", "Tuesday", "Wednesday", "Thhursday", "Friday", "Saturday", "Sunday"]
|
|
||||||
return days[d-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.main}>
|
<div className={styles.main}>
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
<div className={styles.greeting}>{greet}, Nishant</div>
|
<div className={styles.greeting}>{greet}, Nishant</div>
|
||||||
<div className={styles.date}>{`It's ${today.getDate()}${nth(today.getDate())} of ${today.toLocaleString('default', { month: 'long' })}, a ${dayName(today.getDay())}`}</div>
|
<div className={styles.date}>{"It's 3rd of January, a Monday"}</div>
|
||||||
</div>
|
</div>
|
||||||
<CenterLoading />
|
<CenterLoading />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,22 +9,3 @@
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlay {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
position: absolute;
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
background: #F0F1F5;
|
|
||||||
padding: 20px;
|
|
||||||
color: #7F7C9A;
|
|
||||||
font: bold 1.2em Arial, Sans-serif;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 600px){
|
|
||||||
.overlay {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,10 @@ import RecentTransactions from './components/RecentTransactions'
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<main className={styles.main}>
|
<main className={styles.main}>
|
||||||
<RecurringCol />
|
<RecurringCol />
|
||||||
<CenterCol />
|
<CenterCol />
|
||||||
<RecentTransactions />
|
<RecentTransactions />
|
||||||
</main>
|
</main>
|
||||||
<div className={styles.overlay}>The demo is best viewed on the Desktop :)</div>
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue