feat(ui): antd i18n
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import moment from "moment";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { type Access } from "@/domain/access";
|
||||
import { getPocketBase } from "./pocketbase";
|
||||
@@ -19,6 +19,6 @@ export const save = async (record: Access) => {
|
||||
};
|
||||
|
||||
export const remove = async (record: Access) => {
|
||||
record.deleted = moment.utc().format("YYYY-MM-DD HH:mm:ss");
|
||||
record.deleted = dayjs.utc().format("YYYY-MM-DD HH:mm:ss");
|
||||
return await getPocketBase().collection("access").update(record.id, record);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import dayjs from "dayjs";
|
||||
import { type RecordListOptions } from "pocketbase";
|
||||
import moment from "moment";
|
||||
|
||||
import { type Certificate } from "@/domain/certificate";
|
||||
import { getPocketBase } from "./pocketbase";
|
||||
@@ -23,7 +23,7 @@ export const list = async (req: CertificateListReq) => {
|
||||
|
||||
if (req.state === "expireSoon") {
|
||||
options.filter = pb.filter("expireAt<{:expiredAt}", {
|
||||
expiredAt: moment().add(15, "d").toDate(),
|
||||
expiredAt: dayjs().add(15, "d").toDate(),
|
||||
});
|
||||
} else if (req.state === "expired") {
|
||||
options.filter = pb.filter("expireAt<={:expiredAt}", {
|
||||
|
||||
Reference in New Issue
Block a user