mirror of
https://github.com/rowyio/rowy.git
synced 2026-07-11 21:08:58 +02:00
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Firetable",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"homepage": "https://firetable.io/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -45,14 +45,20 @@ export default function ReExecute() {
|
||||
const handleConfirm = async () => {
|
||||
setUpdating(true);
|
||||
const _ft_forcedUpdateAt = new Date();
|
||||
const batch = db.batch();
|
||||
const querySnapshot = await query.get();
|
||||
querySnapshot.docs.forEach((doc) => {
|
||||
batch.update(doc.ref, { _ft_forcedUpdateAt });
|
||||
});
|
||||
await batch.commit();
|
||||
setUpdating(false);
|
||||
setTimeout(() => setOpen(false), 3000); // give time to for ft function to run
|
||||
const docs = [...querySnapshot.docs];
|
||||
while (docs.length) {
|
||||
const batch = db.batch();
|
||||
const temp = docs.splice(0, 499);
|
||||
temp.forEach((doc) => {
|
||||
batch.update(doc.ref, { _ft_forcedUpdateAt });
|
||||
});
|
||||
await batch.commit();
|
||||
}
|
||||
setTimeout(() => {
|
||||
setUpdating(false);
|
||||
setOpen(false);
|
||||
}, 3000); // give time to for ft function to run
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -49,7 +49,7 @@ export default function ActionFab({
|
||||
const { requestConfirmation } = useConfirmation();
|
||||
const { requestParams } = useActionParams();
|
||||
const { tableState } = useFiretableContext();
|
||||
const { createdAt, updatedAt, id, ref, ...docData } = row;
|
||||
const { ref } = row;
|
||||
const { config } = column as any;
|
||||
|
||||
const action = !value
|
||||
@@ -65,8 +65,11 @@ export default function ActionFab({
|
||||
const callableName: string =
|
||||
(column as any).callableName ?? config.callableName ?? "actionScript";
|
||||
const handleRun = (actionParams = null) => {
|
||||
if (!ref.path || !ref.id) {
|
||||
snack.open({ message: "no ref set", variant: "error" });
|
||||
return;
|
||||
}
|
||||
setIsRunning(true);
|
||||
|
||||
const data = {
|
||||
ref: { path: ref.path, id: ref.id, tablePath: window.location.pathname },
|
||||
column: { ...column, editor: undefined },
|
||||
|
||||
Reference in New Issue
Block a user