package info.bukova.isspst.ui.main.invoicing;

import info.bukova.isspst.data.Invoicing;
import org.springframework.security.access.AccessDeniedException;
import org.zkoss.bind.annotation.Init;

import java.util.ArrayList;
import java.util.List;

public class InvoicingServicesPendingList extends InvoicingList {

    @Init(superclass = true)
    public void initInvoicingServicesPendingList()
    {
        formZul = "/main/invoicing/services/invHeadForm.zul";
    }

    @Override
    protected List<Invoicing> getListFromService() {
        try
        {
            return invoicingService.getServicesPendingList();
        }
        catch (AccessDeniedException e)
        {
            e.printStackTrace();
            return new ArrayList<Invoicing>();
        }
    }
}
