Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 56b36ca7

Přidáno uživatelem Jan Pašek před asi 4 roky(ů)

Re #8583 - Display issued certificates

Zobrazit rozdíly:

static/js/certificate.js
9 9
            error: false,
10 10
            id: null,
11 11
            revocationReason: "unspecified",
12
            issuedCertificates: [],
12 13
            certificate: {
13 14
                subject: {
14 15
                    C: "",
......
120 121
                    if (response.data["success"]) {
121 122
                        // display certificate
122 123
                        certificateDetailsApp.certificate = response.data["data"];
124
                        loadIssuedCertificates();
123 125
                        certificateDetailsApp.loading = false;
124 126
                        certificateDetailsApp.error = false;
125 127
                    }
......
147 149
        certificateDetailsApp.loading = false;
148 150
        certificateDetailsApp.error = true;
149 151
    }
152

  
153
    function loadIssuedCertificates() {
154
            axios.get(API_URL+"certificates", {
155
            params: {
156
                filtering: {
157
                    issuedby: parseInt(certificateDetailsApp.id)
158
                }
159
            }
160
        })
161
        .then(function (response) {
162
            if (response.data["success"]) {
163
                response.data["data"].forEach(item => {if(item.id != certificateDetailsApp.id) certificateDetailsApp.issuedCertificates.push(item)})
164
            }
165
            else
166
            {
167
                certificateDetailsApp.issuedCertificates = [];
168
            }
169
        })
170
        .catch(function (error) {
171
            console.log(error);
172
        });
173
    }

Také k dispozici: Unified diff