27 Commits

Author SHA1 Message Date
Lee Robinson
a180f76208 Merge branch 'main' of https://github.com/vercel/next-learn into update 2023-10-12 16:36:54 -05:00
Delba de Oliveira
f53d117332 Update error page styles (#210)
Co-authored-by: Stephanie Dietz <49788645+StephDietz@users.noreply.github.com>
2023-10-12 08:59:43 -05:00
Delba de Oliveira
24ac91ac03 Fix form bugs (#209)
* Move breadcrumbs

* Update definitions

* Update breadcrumbs.tsx

* Move redirect outside try/catch block

* Update forms
2023-10-12 08:54:02 -05:00
Delba de Oliveira
c6413f9037 Add table loading skeletons and move data fetching down (#207)
* Use tailwind variants

* Move data fetching down

* Add table skeleton

* Update pagination data fetching

* Fix skeleton layout shift

* Add key to suspense to trigger it on subsequent navigation
2023-10-10 14:04:46 +01:00
Delba de Oliveira
728368d712 Fix pagination bugs and refactor/abstract styling logic (#205)
* Simplify TS

* Abstract away pagination logic

* Clean up

* Fix bugs and refactor styling logic

* Add comments

* Fix border bug for single page

* Fix search pagination
2023-10-09 16:59:24 +01:00
Lee Robinson
197ffcd6b9 Update to latest + refactoring. 2023-10-06 22:13:22 -05:00
Delba de Oliveira
cf85adfbc5 Improve contrast on skeletons (#201)
* Darken skeletons for screenshots

* Fix shimmer bug

* Add delay

* Use 3 secs
2023-10-06 09:42:31 -05:00
Delba de Oliveira
3f2a2ae845 Clean up 💅🏼 (#198)
* Use string literals

* Use 666 for evil rabbit

* Delete extra logo

* Use consistent pixels for images

* Update button.tsx

* Fix 666 mistake
2023-10-06 14:28:42 +01:00
Delba de Oliveira
11b0e7c69d Combine data fetches for cards (#197) 2023-10-05 15:18:08 +01:00
Emil Kowalski
e4dc33e944 Update customers view (#196)
* Update tables

* Add new customers, add search, polish

* Make search reusable, update customers

* polish
2023-10-05 09:16:12 +01:00
Stephanie Dietz
32a3529efa Update the UI for the invoices page. (#191)
* table ui / invoice page

* add mobile table styling

* move css styles to parent

* resolve comments

* move create button to be inline with search

* remove hey from table lol

* fix awkward mobile scrolling

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2023-10-04 13:37:21 -05:00
Delba de Oliveira
da17909352 Add Code for Chapter 12 - Accessibility and Form Validation (#180) 2023-10-02 10:43:55 -05:00
Delba de Oliveira
e5af71ca45 Code for Chapter 11 - Error Handling (#178) 2023-10-02 10:06:07 -05:00
Delba de Oliveira
b0d832e2cf Code for Chapters 9-10 (#172) 2023-10-02 09:26:13 -05:00
Delba de Oliveira
2897b290d3 Simplify invoices table.tsx component (#166)
* Rename file and add data fetches for overview page

* Rename calculations.ts to utils.ts

* Update code to match course

* Add temporary calculation

* Fix error

* Move types to data fetching file

* Add error handling

* Parallelize data fetches

* Add skeletons

* Add delayed data request

* Fix ts errors

* Code for chapter 8

* Fix error

* Clean up

* Move formatDateToLocal to utils file

* Extract add invoice button

* Extract edit invoice button

* Extract InvoiceStatus

* Use formatCurrency from utils

* Misc

* Use outline icon

* outline!

* Rename table-search to search
2023-09-19 13:24:38 -05:00
Delba de Oliveira
24bcb816e5 Add code for chapters 7-8 (#164)
* Rename file and add data fetches for overview page

* Rename calculations.ts to utils.ts

* Update code to match course

* Add temporary calculation

* Fix error

* Move types to data fetching file

* Add error handling

* Parallelize data fetches

* Add skeletons

* Add delayed data request

* Fix ts errors

* Code for chapter 8

* Fix error

* Clean up

---------

Co-authored-by: Stephanie Dietz <49788645+StephDietz@users.noreply.github.com>
2023-09-19 12:55:02 -05:00
Stephanie Dietz
7e4b69351e Add database (#153)
* add database to project. Seed data. Update customerId to customer_id

* seed customers table data

* use database everywhere

* refactor

* fix ts lint errors

* add type to invoice edit page

* remove fetch-data file and fetch data directly in components

* update lates invoices to use sql

* in invoice table,  search the database here with SQL

* rename tsx files to ts and add node script to seed data

* address rest of PR comments

* move all data fetches to own file

* add types to filter invoices function

* remove unused param

* prettier

* update function names
2023-09-13 12:16:09 -05:00
Delba de Oliveira
5f38f0fa81 Polish Mobile Styles 💅🏼 and update code for chapters 1-5 (#150)
* Add local date formatting

* Add dashboard hero image

* Update hero styles

* Polish login form

* Use Next.js symbol for logo

* Use Next.js symbol for favicon

* Use img instead of Image

* Add mobile styles to login form

* Polish nav styles to fit logo

* Fix build error

* Create og-image.png

* Remove unused code

* Replace svg logo with png

* Update Images and Links

* Misc

* Remove topnav

* Remove dummy text from cards

* Remove gradient

* Adjust button color

* Fix table horizontal scroll

* Misc

* Fix table UI bug

* Remove duplicate package-lock files

* Polish invoice form

* Rename delete button

* Misc

* Run prettier

* Fix search and pagination on mobile

* Fix pagination border px bug

* Update code to match course

* Rename global -> globals

* 💅 Home Page

* Test placeholder blur

* Use 1.5x image rather than 2x

* Update root layout

* Use <main> for pages

* Make sidebar a server component

* Don't use index for React key
2023-09-13 10:44:25 +01:00
Stephanie Dietz
b8935abc32 add pagination and search bar to the invoice table (#146)
* add pagination and search bar to the invoice table

* make table component server

* fix eslint

* eslint

* eslint

* Updates pagination url to not use state or router and moves pagination component up above the table

* fix eslint typing error

* resolve github convos

* update all 'q' to be 'query'

---------

Co-authored-by: Michael Novotny <manovotny@gmail.com>
2023-09-07 16:37:23 +01:00
Michael Novotny
1725e58866 Moves prettier and lint to root of the project (#143) 2023-09-06 12:57:56 -05:00
Delba de Oliveira
62271d7986 Add total paid/pending columns to customer table (#145)
* Delete individual invoice pages

* Add pending / paid totals to customer table

* Misc
2023-09-06 10:19:15 -05:00
Delba de Oliveira
83293ab924 Add "edit" invoice functionality (#144)
* Organize components

* Add delete invoice component and action

* Update customer emails

* Add delete button, pending/paid UI, and placeholder edit button

* Fix build errors

* More errors

* Fix table corners

* Rename add invoice form, and make it generic for edit or add

* Wire it up!

* Add server action placeholder

* Fix TS errors

* Misc
2023-09-06 08:18:40 -05:00
Delba de Oliveira
b85b3e217b Add delete invoice functionality (#140)
* Organize components

* Add delete invoice component and action

* Update customer emails

* Add delete button, pending/paid UI, and placeholder edit button

* Fix build errors

* More errors
2023-09-05 10:30:42 -05:00
Delba de Oliveira
acc531b370 Add dashboard overview page (#135)
* Run create-next-app

* Add READMEs

* Remove stuff we don't need

* Add dummy data

* Add types for dummy data

* Add dummy routes

* Remove unused CSS

* Split dummy data and definitions

* Add prettier plugin for tailwind

* Create background-blur.tsx

* Create hero.tsx

* Create login-form.tsx

* Tweak

* Install hero icons and clsx

* Create calculations.tsx

* Update dummy-data.tsx

* Create card.tsx

* Create dashboard-overview.tsx

* Update page.tsx

* Add placeholder for dashboard-topnav

* Adjust sizings for whole page

* Update card styles and add icons

* ugh, fonts are hard

* misc

* Misc

* Switch to flex

* Add revenue data and definitions

* Misc

* Merge branch 'master' into example-f9sv

* Remove unused code

* Add sort invoices calc - to be replaced with SQL

* Add date to invoices table

* Add customer images

* Add LatestInvoices component

* Optimize for mobile

* Misc

* Tweak

* Remove duplicate date fields

* Mobile tweaks
2023-09-01 11:38:55 -05:00
Stephanie Dietz
5225fc3b54 Add table component (#132)
* add table compoennt

* format

* format

* change table type to be a card

* update table header and link

* update layout and table width

* Update dashboard/15-final/app/ui/table.tsx

---------

Co-authored-by: Delba de Oliveira <delbabrown@gmail.com>
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2023-09-01 14:49:59 +01:00
Delba de Oliveira
c0f63f4d25 Add card component and calculations (#130)
* Run create-next-app

* Add READMEs

* Remove stuff we don't need

* Add dummy data

* Add types for dummy data

* Add dummy routes

* Remove unused CSS

* Split dummy data and definitions

* Add prettier plugin for tailwind

* Create background-blur.tsx

* Create hero.tsx

* Create login-form.tsx

* Tweak

* Install hero icons and clsx

* Create calculations.tsx

* Update dummy-data.tsx

* Create card.tsx

* Create dashboard-overview.tsx

* Update page.tsx

* Add placeholder for dashboard-topnav

* Adjust sizings for whole page

* Update card styles and add icons

* ugh, fonts are hard

* misc

* Remo unused import
2023-08-31 08:50:05 -05:00
Delba de Oliveira
8dd0d1d863 Add dummy data and routes (#127)
* Run create-next-app

* Add READMEs

* Remove stuff we don't need

* Add dummy data

* Add types for dummy data

* Add dummy routes

* Remove unused CSS

* Split dummy data and definitions
2023-08-30 10:37:50 -05:00