fix(salary): add null check for id before processing
This commit is contained in:
parent
26ae535b15
commit
3c15bb3b0b
2 changed files with 4 additions and 0 deletions
|
|
@ -222,6 +222,7 @@ const itemsCard = ref([
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataQuota(id: string) {
|
||||
if (!id) return;
|
||||
await http
|
||||
.get(config.API.salaryListPeriodQuota(id))
|
||||
.then((res) => {
|
||||
|
|
@ -254,6 +255,7 @@ async function fetchDataQuota(id: string) {
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataPeriod(id: string, force: boolean = false) {
|
||||
if (!id) return;
|
||||
force && showLoader();
|
||||
let formData = {
|
||||
...params.value,
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ const itemsCard = ref([
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataQuota(id: string) {
|
||||
if (!id) return;
|
||||
await http
|
||||
.get(config.API.salaryListPeriodQuotaEmp(id))
|
||||
.then((res) => {
|
||||
|
|
@ -246,6 +247,7 @@ async function fetchDataQuota(id: string) {
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataPeriod(id: string, force: boolean = false) {
|
||||
if (!id) return;
|
||||
force && showLoader();
|
||||
let formData = {
|
||||
...params.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue