Skip to content

Commit

Permalink
Update costcenter (labring#4990)
Browse files Browse the repository at this point in the history
* feat:update costcenter

* feat:(costcenter): bot callback

* feat:(costcenter): bot callback

* chore: clean code
  • Loading branch information
xudaotutou authored and zjy365 committed Sep 3, 2024
1 parent 2eceb67 commit 640e3b6
Show file tree
Hide file tree
Showing 162 changed files with 7,111 additions and 2,948 deletions.
3 changes: 2 additions & 1 deletion frontend/packages/ui/src/components/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,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 Down Expand Up @@ -130,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
26 changes: 13 additions & 13 deletions frontend/packages/ui/src/components/icons/PortIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ const PortIcon = createIcon({
displayName: 'PortIcon',
viewBox: '0 0 16 16',
path: (
<g fill="none" xmlns="http://www.w3.org/2000/svg">
<g width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M3.9167 6.24996C3.9167 6.59996 4.15004 6.8333 4.50004 6.8333C4.85004 6.8333 5.08337 6.59996 5.08337 6.24996V5.66663C5.08337 5.31663 4.85004 5.0833 4.50004 5.0833C4.15004 5.0833 3.9167 5.31663 3.9167 5.66663V6.24996Z"
fill="#24282C"
d="M3.93331 5.73697C3.93331 5.36878 4.23179 5.0703 4.59998 5.0703C4.96817 5.0703 5.26664 5.36878 5.26664 5.73697V6.6703C5.26664 7.03849 4.96817 7.33697 4.59998 7.33697C4.23179 7.33697 3.93331 7.03849 3.93331 6.6703V5.73697Z"
fill="#485264"
/>
<path
d="M6.25004 6.24996C6.25004 6.59996 6.48337 6.8333 6.83337 6.8333C7.18337 6.8333 7.4167 6.59996 7.4167 6.24996V5.66663C7.4167 5.31663 7.18337 5.0833 6.83337 5.0833C6.48337 5.0833 6.25004 5.31663 6.25004 5.66663V6.24996Z"
fill="#24282C"
d="M6.19995 5.73697C6.19995 5.36878 6.49843 5.0703 6.86662 5.0703C7.23481 5.0703 7.53328 5.36878 7.53328 5.73697V6.6703C7.53328 7.03849 7.23481 7.33697 6.86662 7.33697C6.49843 7.33697 6.19995 7.03849 6.19995 6.6703V5.73697Z"
fill="#485264"
/>
<path
d="M8.58337 6.24996C8.58337 6.59996 8.8167 6.8333 9.1667 6.8333C9.5167 6.8333 9.75004 6.59996 9.75004 6.24996V5.66663C9.75004 5.31663 9.5167 5.0833 9.1667 5.0833C8.8167 5.0833 8.58337 5.31663 8.58337 5.66663V6.24996Z"
fill="#24282C"
d="M8.46663 5.73697C8.46663 5.36878 8.76511 5.0703 9.1333 5.0703C9.50149 5.0703 9.79997 5.36878 9.79997 5.73697V6.6703C9.79997 7.03849 9.50149 7.33697 9.1333 7.33697C8.76511 7.33697 8.46663 7.03849 8.46663 6.6703V5.73697Z"
fill="#485264"
/>
<path
d="M10.9167 6.24996C10.9167 6.59996 11.15 6.8333 11.5 6.8333C11.85 6.8333 12.0834 6.59996 12.0834 6.24996V5.66663C12.0834 5.31663 11.85 5.0833 11.5 5.0833C11.15 5.0833 10.9167 5.31663 10.9167 5.66663V6.24996Z"
fill="#24282C"
d="M10.7333 5.73697C10.7333 5.36878 11.0318 5.0703 11.3999 5.0703C11.7681 5.0703 12.0666 5.36878 12.0666 5.73697V6.6703C12.0666 7.03849 11.7681 7.33697 11.3999 7.33697C11.0318 7.33697 10.7333 7.03849 10.7333 6.6703V5.73697Z"
fill="#485264"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M5.49167 13.25H10.5083C10.975 13.25 11.4417 12.9583 11.6167 12.4917L12.4917 10.3333H13.8333C14.475 10.3333 15 9.80833 15 9.16667V3.91667C15 3.275 14.475 2.75 13.8333 2.75H2.16667C1.525 2.75 1 3.275 1 3.91667V9.16667C1 9.80833 1.525 10.3333 2.16667 10.3333H3.50833L4.38333 12.4917C4.55833 12.9583 5.025 13.25 5.49167 13.25ZM2.16667 9.16667V3.91667H13.8333V9.16667H12.4917C11.9667 9.16667 11.5583 9.45833 11.3833 9.925L10.5083 12.0833H5.49167L4.61667 9.925C4.44167 9.45833 3.975 9.16667 3.50833 9.16667H2.16667Z"
fill="#24282C"
fill-rule="evenodd"
clip-rule="evenodd"
d="M2.66659 2.66821C1.93021 2.66821 1.33325 3.26517 1.33325 4.00155V9.0827C1.33325 9.81908 1.93021 10.416 2.66659 10.416H3.33354C3.43108 10.416 3.52084 10.4693 3.56759 10.5549L4.70498 12.6376C4.93872 13.0657 5.3875 13.3319 5.87519 13.3319H9.97543C10.4631 13.3319 10.9119 13.0657 11.1456 12.6376L12.283 10.5549C12.3298 10.4693 12.4195 10.416 12.5171 10.416H13.3333C14.0696 10.416 14.6666 9.81908 14.6666 9.0827V4.00155C14.6666 3.26517 14.0696 2.66821 13.3333 2.66821H2.66659ZM4.47239 9.42984C4.35552 9.21583 4.13113 9.0827 3.88729 9.0827H2.93325C2.78598 9.0827 2.66659 8.96331 2.66659 8.81603V4.26821C2.66659 4.12094 2.78598 4.00155 2.93325 4.00155L13.0666 4.00155C13.2139 4.00155 13.3333 4.12094 13.3333 4.26821V8.81603C13.3333 8.96331 13.2139 9.0827 13.0666 9.0827H11.9633C11.7195 9.0827 11.4951 9.21583 11.3782 9.42984L10.0892 11.7903C10.019 11.9187 9.88441 11.9986 9.73811 11.9986H6.11251C5.9662 11.9986 5.83157 11.9187 5.76144 11.7903L4.47239 9.42984Z"
fill="#485264"
/>
</g>
)
Expand Down
77 changes: 74 additions & 3 deletions frontend/pnpm-lock.yaml

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

26 changes: 0 additions & 26 deletions frontend/providers/costcenter/data/config.yaml.local

This file was deleted.

1 change: 0 additions & 1 deletion frontend/providers/costcenter/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const nextConfig = {
outputFileTracingRoot: path.join(__dirname, '../../')
},
async headers() {
console.log(ContentSecurityPolicy.replace(/\s{2,}/g, ' ').trim());
return [
{
source: '/',
Expand Down
3 changes: 3 additions & 0 deletions frontend/providers/costcenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,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 +55,8 @@
"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",
"@types/react": "18.2.37",
Expand Down
5 changes: 4 additions & 1 deletion frontend/providers/costcenter/public/locales/en/applist.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"CLOUD-VM":"CLOUD-VM",
"DB": "DATABASE",
"APP": "APP",
"All APP": "ALL"
"All APP": "ALL APP",
"APP-STORE": "APP-STORE",
"DB-BACKUP": "DB-BACKUP",
"all_app_type": "ALL APP TYPE"
}
68 changes: 60 additions & 8 deletions frontend/providers/costcenter/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"Scan with WeChat": "Scan with WeChat",
"Balance": "Balance",
"SideBar": {
"Index": "Home Page",
"CostOverview": "Cost Overview",
"BillingDetails": "Billing Details",
"ValuationStandard": "Standard",
"resource_analysis": "Resource Analysis",
"CreateInvoice": "Create Invoice"
},
"Valuation": {
Expand All @@ -20,21 +22,28 @@
"All Namespace": "All Team ID",
"Bonus": "Bonus",
"Select Amount": "Select Amount",
"Port Amount": "Port Amount",
"CPU Amount": "CPU Amount",
"Storage Amount": "Storage Amount",
"Memory Amount": "Memory Amount",
"Network Amount": "Network Amount",
"Recent Transactions": "Recent Transactions",
"Cost Trend": "Cost Trend",
"Total Cost": "Total Cost",
"Income And Expense": "Income And Expense",
"Deduction": "Deduction",
"Cost Distribution": "Cost Distribution",
"Expenditure": "Expenditure",
"Total Expenditure": "Total Expenditure",
"Total Recharge": "Total Recharge",
"Recharge Amount": "Recharge Amount",
"Confirm": "Confirm",
"Balance Recharge": "Balance Recharge",
"Order Number": "Order Number",
"Transaction Time": "Transaction Time",
"Type": "Type",
"CPU": "CPU",
"Port": "TCP External Port",
"Port": "Port",
"onlyChargedWhenOpenDBPublicAccess": "Only charged when enabling public access to the database",
"Memory": "Memory",
"Network": "Network",
Expand All @@ -48,6 +57,7 @@
"Payment Result": "Payment Result",
"Payment Successful": "Payment Successful",
"In Payment": "In Payment ...",
"Region": "Region",
"Hour": "Hour",
"Day": "Day",
"Week": "Week",
Expand Down Expand Up @@ -78,19 +88,21 @@
"Stripe Cancel": "cancel to pay with Stripe",
"GPU Unit": "Card",
"Gpu valuation": "GPU Price Table",
"common valuation": "Price Table",
"common valuation": "Basic Valuation",
"Billing Details": "Billing Details",
"orders": {
"list": "Order List",
"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 @@ -124,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 @@ -147,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 All @@ -160,9 +191,30 @@
"APP Name": "App name",
"APP Type": "App type",
"Details": "Details",
"Transfer Type":"Transfer Type",
"Transfer Type": "Transfer Type",
"Handle": "Handle",
"currencyUnit": "Currency Unit",
"Trader ID":"Trader"

}
"Trader ID": "Trader",
"region_type": "region",
"region": "Region",
"all_workspace_id": "All Workspace ID",
"workspace": "Workspace",
"app_name": "App Name",
"Last 7 days": "Last 7 days",
"Last 6 Months": "last 6 months",
"All Regions": "All Regions",
"Annual Income and Expenditure": "Annual Income and Expenditure",
"Billing List": "Billing List",
"Network valuation": "Network Valuation",
"applist": {
"Other": "others"
},
"Used": "Used",
"Remain": "Remain",
"Cost Form": "Cost Form",
"All App Cost Form": "All App Cost Form",
"Price Table": "Price Table",
"all_workspace": "All Workspace",
"preferential_rules": "Preferential Rules",
"preferential_strength": "Preferential Strength"
}
Loading

0 comments on commit 640e3b6

Please sign in to comment.