diff --git a/package.json b/package.json index 7ab005930..f408697d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iSunFA", - "version": "0.1.8+165", + "version": "0.1.8+166", "private": false, "scripts": { "dev": "next dev", diff --git a/src/components/button/button.tsx b/src/components/button/button.tsx index 0a1fbd8f7..35f67145f 100644 --- a/src/components/button/button.tsx +++ b/src/components/button/button.tsx @@ -4,7 +4,7 @@ import { cn } from '@/lib/utils/common'; // Info: 用 cva 來定義 button 的樣式 (20240319 - Shirley) const buttonVariants = cva( - '"gap space-x-2 ring-offset-background focus-visible:ring-ring group inline-flex items-center justify-center whitespace-nowrap rounded-xs font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-100', + '"gap space-x-2 ring-offset-background focus-visible:ring-ring group inline-flex items-center justify-center whitespace-nowrap rounded-xs font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-100 disabled:cursor-not-allowed', { variants: { variant: { @@ -13,9 +13,9 @@ const buttonVariants = cva( tertiary: 'bg-button-surface-strong-secondary text-button-text-invert hover:bg-button-surface-strong-secondary-hover disabled:bg-button-surface-strong-disable', tertiaryOutline: - 'border border-button-surface-strong-secondary text-button-surface-strong-secondary hover:border-button-text-primary hover:text-button-text-primary group-hover:border-button-text-primary group-hover:text-button-text-primary', + 'border border-button-surface-strong-secondary text-button-surface-strong-secondary hover:border-button-text-primary hover:text-button-text-primary group-hover:border-button-text-primary group-hover:text-button-text-primary disabled:text-button-text-disable disabled:border-button-stroke-disable', secondaryOutline: - 'border border-button-text-secondary text-button-text-secondary hover:border-button-text-primary hover:text-button-text-primary group-hover:border-button-text-primary group-hover:text-button-text-primary', + 'border border-button-text-secondary text-button-text-secondary hover:border-button-text-primary hover:text-button-text-primary group-hover:border-button-text-primary group-hover:text-button-text-primary disabled:text-button-text-disable disabled:border-button-stroke-disable', tertiaryBorderless: 'border-none border-button-surface-strong-secondary text-button-surface-strong-secondary hover:border-button-text-primary hover:text-button-text-primary group-hover:border-button-text-primary group-hover:text-button-text-primary disabled:text-button-text-disable', secondaryBorderless: diff --git a/src/components/date_picker/date_picker.tsx b/src/components/date_picker/date_picker.tsx index 105347945..7bc5456a1 100644 --- a/src/components/date_picker/date_picker.tsx +++ b/src/components/date_picker/date_picker.tsx @@ -387,7 +387,7 @@ const DatePicker = ({ onClick={openCalenderHandler} className={cn( // default style - 'flex w-full items-center space-x-3 rounded-xs border border-lightGray3 bg-white p-3 text-input-text-input-placeholder hover:cursor-pointer', + 'flex w-full items-center space-x-3 rounded-sm border border-lightGray3 bg-white p-3 text-input-text-input-placeholder hover:cursor-pointer', // props control style btnClassName, // variables control style @@ -427,7 +427,7 @@ const DatePicker = ({ variant={'tertiaryOutline'} onClick={openCalenderHandler} className={cn( - 'group flex w-full items-center rounded-xs border border-lightGray3 bg-white px-3 py-3 hover:cursor-pointer', + 'group flex w-full items-center rounded-sm border border-lightGray3 bg-white px-3 py-3 hover:cursor-pointer', btnClassName, { 'border-primaryYellow text-primaryYellow': componentVisible, diff --git a/src/components/i18n/i18n.tsx b/src/components/i18n/i18n.tsx index a3785d53c..954e83bdc 100644 --- a/src/components/i18n/i18n.tsx +++ b/src/components/i18n/i18n.tsx @@ -68,18 +68,18 @@ const I18n = ({ langIsOpen, setLangIsOpen }: II18nProps) => {
- {signedIn ? username ?? DEFAULT_DISPLAYED_USER_NAME : ''} + {signedIn ? (username ?? DEFAULT_DISPLAYED_USER_NAME) : ''}
+ {/* Info: edit name button (20240809 - Shirley) */} -
); - const displayedList = reportItems - // Info: (20240722 - Julian) 依照 createdTimestamp 由新到舊排序 - .sort((a, b) => b.createdAt - a.createdAt) - .map((reportItem, index) => ( - individualCheckHandler(index)} - onReportItemUpdate={handleReportItemUpdate} - onReportItemDelete={handleReportItemDelete} - /> - )); + const displayedList = reportItems.map((reportItem, index) => ( + individualCheckHandler(index)} + onReportItemUpdate={handleReportItemUpdate} + onReportItemDelete={handleReportItemDelete} + /> + )); const displayedCheckbox = isCheckboxVisible ? ( diff --git a/src/components/reports_history_item/reports_history_item.tsx b/src/components/reports_history_item/reports_history_item.tsx index 116666b9e..778259e54 100644 --- a/src/components/reports_history_item/reports_history_item.tsx +++ b/src/components/reports_history_item/reports_history_item.tsx @@ -107,24 +107,26 @@ const ReportsHistoryItem = ({ {/* Info: (20240514 - Shirley) Blockchain explorer link */} - - - + {blockChainExplorerLink ? ( + + + + ) : null} {/* Info: project (20240528 - Shirley) */} {displayedProject} diff --git a/src/components/reports_history_list/reports_history_list.tsx b/src/components/reports_history_list/reports_history_list.tsx index 49e4560a8..e18665f0d 100644 --- a/src/components/reports_history_list/reports_history_list.tsx +++ b/src/components/reports_history_list/reports_history_list.tsx @@ -49,18 +49,15 @@ const ReportsHistoryList = ({ reports }: IReportsHistoryListProps) => { setIndividualChecks(updatedChecks); }; - const displayedList = reports - // Info: (20240722 - Julian) 依照 createdTimestamp 由新到舊排序 - .sort((a, b) => b.createdAt - a.createdAt) - .map((report, index) => ( - individualCheckHandler(index)} - isCheckboxVisible={isCheckboxVisible} - /> - )); + const displayedList = reports.map((report, index) => ( + individualCheckHandler(index)} + isCheckboxVisible={isCheckboxVisible} + /> + )); const displayedStatusButtons = (
{isCheckboxVisible ? ( diff --git a/src/components/select_company_page_body/select_company_page_body.tsx b/src/components/select_company_page_body/select_company_page_body.tsx index 5fa565fef..c20ac3da0 100644 --- a/src/components/select_company_page_body/select_company_page_body.tsx +++ b/src/components/select_company_page_body/select_company_page_body.tsx @@ -163,7 +163,8 @@ const SelectCompanyPageBody = () => {