Skip to main content

Resume Actions

Resume server actions are functions which interact with a members resume data in the database. These functions are used to perform operations on the resume sections, such as creating, updating, and deleting section entries.

Section 1

async getSection1(docId)

Gets a section 1 document by its ID.

Example usage:

import { getSection1 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection1(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection1Docs()

Gets all section 1 documents for the current user.

Example usage:

import { getSection1Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection1Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection1(prevState, formData)

Add a new section 1 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection1 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection1, null);
...

Section 2

async getSection2(docId)

Gets a section 2 document by its ID.

Example usage:

import { getSection2 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection2(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection2Docs()

Gets all section 2 documents for the current user.

Example usage:

import { getSection2Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection2Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection2(prevState, formData)

Add a new section 2 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection2 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection2, null);
...

Section 3

async getSection3(docId)

Gets a section 3 document by its ID.

Example usage:

import { getSection3 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection3(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection3Docs()

Gets all section 3 documents for the current user.

Example usage:

import { getSection3Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection3Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection3(prevState, formData)

Add a new section 3 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection3 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection3, null);
...

Section 4

async getSection4(docId)

Gets a section 4 document by its ID.

Example usage:

import { getSection4 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection4(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection4Docs()

Gets all section 4 documents for the current user.

Example usage:

import { getSection4Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection4Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection4(prevState, formData)

Add a new section 4 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection4 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection4, null);
...

Section 5

async getSection5(docId)

Gets a section 5 document by its ID.

Example usage:

import { getSection5 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection5(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection5Docs()

Gets all section 5 documents for the current user.

Example usage:

import { getSection5Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection5Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection5(prevState, formData)

Add a new section 5 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection5 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection5, null);
...

Section 6

async getSection6(docId)

Gets a section 6 document by its ID.

Example usage:

import { getSection6 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection6(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection6Docs()

Gets all section 6 documents for the current user.

Example usage:

import { getSection6Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection6Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection6(prevState, formData)

Add a new section 6 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection6 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection6, null);
...

Section 7

async getSection7(docId)

Gets a section 7 document by its ID.

Example usage:

import { getSection7 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection7(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection7Docs()

Gets all section 7 documents for the current user.

Example usage:

import { getSection7Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection7Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection7(prevState, formData)

Add a new section 7 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection7 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection7, null);
...

Section 8

async getSection8(docId)

Gets a section 8 document by its ID.

Example usage:

import { getSection8 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection8(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection8Docs()

Gets all section 8 documents for the current user.

Example usage:

import { getSection8Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection8Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection8(prevState, formData)

Add a new section 8 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection8 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection8, null);
...

Section 9

async getSection9(docId)

Gets a section 9 document by its ID.

Example usage:

import { getSection9 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection9(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection9Docs()

Gets all section 9 documents for the current user.

Example usage:

import { getSection9Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection9Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection9(prevState, formData)

Add a new section 9 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection9 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection9, null);
...

Section 10

async getSection10(docId)

Gets a section 10 document by its ID.

Example usage:

import { getSection10 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection10(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection10Docs()

Gets all section 10 documents for the current user.

Example usage:

import { getSection10Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection10Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection10(prevState, formData)

Add a new section 10 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection10 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection10, null);
...

Section 11

async getSection11(docId)

Gets a section 11 document by its ID.

Example usage:

import { getSection11 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection11(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection11Docs()

Gets all section 11 documents for the current user.

Example usage:

import { getSection11Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection11Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection11(prevState, formData)

Add a new section 11 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection11 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection11, null);
...

Section 12

async getSection12(docId)

Gets a section 12 document by its ID.

Example usage:

import { getSection12 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection12(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection12Docs()

Gets all section 12 documents for the current user.

Example usage:

import { getSection12Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection12Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection12(prevState, formData)

Add a new section 12 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection12 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection12, null);
...

Section 13

async getSection13(docId)

Gets a section 13 document by its ID.

Example usage:

import { getSection13 } from "@/app/_db/srvactions/resume";
...

const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection13(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection13Docs()

Gets all section 13 documents for the current user.

Example usage:

import { getSection13Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection13Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection13(prevState, formData)

Add a new section 13 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection13 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection13, null);
...

Section 14

async getSection14(docId)

Gets a section 14 document by its ID.

Example usage:

import { getSection14 } from "@/app/_db/srvactions/resume";
...
const [section, setSection] = useState(null);

useEffect(() => {
try {
getSection14(docId).then((data) => {
setSection(data);
});
} catch (error) {
console.error("Error fetching section:", error);
}
}, []);
...

async getSection14Docs()

Gets all section 14 documents for the current user.

Example usage:

import { getSection14Docs } from "@/app/_db/srvactions/resume";
...
const [sectionData, setSectionData] = useState(null);

useEffect(() => {
try {
getSection14Docs().then((data) => {
setSectionData(data);
});
} catch (error) {
console.error("Error fetching sections:", error);
}
}, []);
...

async addSection14(prevState, formData)

Add a new section 14 document to the database. This function is intended to be used with an HTML form data object. This will often be called with the react hook useFormState.

Example usage:

import { addSection14 } from "@/app/_db/srvactions/resume";
...
const [formState, setFormState] = useFormState(addSection14, null);
...