Skip to content

Commit

Permalink
feat:(costcenter): bot callback
Browse files Browse the repository at this point in the history
  • Loading branch information
xudaotutou committed Aug 21, 2024
1 parent 955f25f commit c2201f2
Show file tree
Hide file tree
Showing 54 changed files with 2,414 additions and 982 deletions.
16 changes: 5 additions & 11 deletions frontend/packages/ui/src/components/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
Button,
useDisclosure,
useOutsideClick,
MenuButton
MenuButton,
Flex
} from '@chakra-ui/react';
import type { ButtonProps } from '@chakra-ui/react';
import { ChevronDownIcon } from '@chakra-ui/icons';
Expand Down Expand Up @@ -68,7 +69,7 @@ const MySelect = (
ref={ref}
display={'flex'}
alignItems={'center'}
justifyContent={'space-between'}
justifyContent={'center'}
border={'1px solid #E8EBF0'}
borderRadius={'md'}
fontSize={'12px'}
Expand All @@ -93,15 +94,7 @@ const MySelect = (
})}
{...props}
>
{activeMenu ? (
<>
<Box>{activeMenu.label}</Box>
</>
) : (
<>
<Box>{placeholder}</Box>
</>
)}
<Flex justifyContent={'flex-start'}>{activeMenu ? activeMenu.label : placeholder}</Flex>
</MenuButton>

<MenuList
Expand Down Expand Up @@ -137,6 +130,7 @@ const MySelect = (
bg: 'rgba(17, 24, 36, 0.05)',
color: 'brightBlue.600'
}}
p={'6px'}
onClick={() => {
if (onchange && value !== item.value) {
onchange(item.value);
Expand Down
131 changes: 131 additions & 0 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions frontend/providers/costcenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@kubernetes/client-node": "0.18.0",
"@larksuiteoapi/node-sdk": "^1.32.0",
"@sealos/ui": "workspace:^",
"@stripe/stripe-js": "^1.54.2",
"@tanstack/query-sync-storage-persister": "^4.35.3",
Expand All @@ -36,6 +37,7 @@
"immer": "^9.0.21",
"js-cookie": "^3.0.5",
"js-yaml": "^4.1.0",
"jsonwebtoken": "^9.0.2",
"lodash": "^4.17.21",
"mongodb": "^5.9.0",
"next": "13.1.6",
Expand All @@ -54,6 +56,7 @@
"devDependencies": {
"@types/js-cookie": "^3.0.4",
"@types/js-yaml": "^4.0.6",
"@types/jsonwebtoken": "^9.0.3",
"@types/lodash": "^4.14.199",
"@types/node": "18.15.5",
"@types/nprogress": "^0.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"APP": "APP",
"All APP": "ALL APP",
"APP-STORE": "APP-STORE",
"DB-BACKUP": "DB-BACKUP",
"all_app_type": "ALL APP TYPE"
}
25 changes: 23 additions & 2 deletions frontend/providers/costcenter/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@
"invoiceAmount": "Invoice Amount",
"invoice": "Generate Invoice",
"invoiceOrder": "Invoice Order",
"invoiceRecord": "Invoice Record",
"phoneValidation": "Please enter a valid phone number",
"taxNumberValidation": "Please enter a valid tax registration number",
"bankAccountValidation": "Please enter a valid bank account number",
"emailValidation": "Please enter a valid email address",
"submit success": "Submit success",
"submit fail": "Submit fail",
"require": "Please enter value",
"code success": "Verification code sent successfully",
"code error": "Verification code sent failed",
"Name": "Name",
Expand Down Expand Up @@ -134,7 +136,15 @@
"fax": {
"name": "Fax",
"placeholder": "Enter fax number"
}
},
"type":{
"name": "Type",
"placeholder": "Enter type",
"list": {
"special": "VAT invoice (Special)",
"normal": "VAT invoice (Normal)"
}
}
},
"contract": {
"person": {
Expand All @@ -157,8 +167,19 @@
"Invoice Details": "Invoice Details",
"Invoice Content": "Invoice Content",
"Electronic Computer Service Fee": "Electronic Computer Service Fee",
"Contact Information": "Contact Information"
"Contact Information": "Contact Information",
"Apply Inovice Tips": "Apply for an invoice need to 3 to 5 days",
"Apply Invoice": "Apply Invoice",

"status":{
"PENDING": "pending",
"COMPLETED": "completed",
"REJECTED": "rejected"
}
},
"Invoice Status": "Invoice Status",
"Invoice Create Time": "invoice create time",
"Invoice Update Time": "invoice update time",
"pay with stripe": "Pay With Stripe",
"pay with wechat": "Pay With Wechat",
"Pay Minimum Tips": "The amount need to be more than 10 when paying with Stripe",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"APP": "应用",
"All APP": "所有应用",
"APP-STORE": "应用商店",
"DB-BACKUP":"数据库备份",
"all_app_type": "所有应用类型"
}
26 changes: 24 additions & 2 deletions frontend/providers/costcenter/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@
"list": "订单列表",
"invoiceAmount": "发票金额",
"invoice": "开发票",
"invoiceRecord": "开票记录",
"invoiceOrder": "发票订单",
"phoneValidation": "请输入有效的手机号码",
"require": "请填写此字段",
"taxNumberValidation": "请输入有效的税务登记证号",
"bankAccountValidation": "请输入有效的银行账号",
"emailValidation": "请输入有效的邮箱地址",
Expand Down Expand Up @@ -131,7 +133,16 @@
"fax": {
"name": "传真",
"placeholder": "填写传真"
}
},
"type": {
"name": "发票类型",
"placeholder": "填写发票类型",
"list": {
"special": "增值税专用发票",
"normal": "增值税普通发票"

}
}
},
"contract": {
"person": {
Expand All @@ -154,8 +165,19 @@
"Invoice Content": "发票内容",
"Electronic Computer Service Fee": "电子计算机服务费",
"Invoice Details": "发票明细",
"Contact Information": "联系方式"
"Contact Information": "联系方式",
"Apply Inovice Tips":"开票需要三到五个工作日处理",
"Apply Invoice": "提交开票申请",

"status":{
"PENDING": "开票中",
"COMPLETED": "已完成",
"REJECTED": "已拒绝"
}
},
"Invoice Status": "开票状态",
"Invoice Create Time": "申请开票时间",
"Invoice Update Time": "开票时间",
"pay with wechat": "微信支付",
"pay with stripe": "Stripe 支付",
"Total Expenditure": "总支出",
Expand Down
Loading

0 comments on commit c2201f2

Please sign in to comment.