Proyectos de Subversion LeadersLinked - Services

Rev

Rev 673 | Rev 676 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 673 Rev 675
Línea 221... Línea 221...
221
                            'filename' => $company->image
221
                            'filename' => $company->image
222
                        ], ['force_canonical' => true]),
222
                        ], ['force_canonical' => true]),
223
                        'profile' => $this->url()->fromRoute('company/view', ['id' => $company->uuid]),
223
                        'profile' => $this->url()->fromRoute('company/view', ['id' => $company->uuid]),
224
                        'last_message' => $timeElapsedString,
224
                        'last_message' => $timeElapsedString,
225
                        'count_unread' => $unread,
225
                        'count_unread' => $unread,
226
                        'messages_link' => $this->url()->fromRoute('inmail/message', ['id' => $company->uuid]),
226
                        'messages_link' => $this->url()->fromRoute('inmail/messages', ['id' => $company->uuid]),
227
                        'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $company->uuid]),
227
                        'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $company->uuid]),
228
                        'selected' => 1, // Marcar como seleccionado
228
                        'selected' => 1, // Marcar como seleccionado
229
                        'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $company->uuid]),
229
                        'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $company->uuid]),
230
                    ]);
230
                    ]);
231
                }
231
                }
Línea 273... Línea 273...
273
                                'filename' => $user->image
273
                                'filename' => $user->image
274
                            ], ['force_canonical' => true]),
274
                            ], ['force_canonical' => true]),
275
                            'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
275
                            'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
276
                            'last_message' => $timeElapsedString,
276
                            'last_message' => $timeElapsedString,
277
                            'count_unread' => $unread,
277
                            'count_unread' => $unread,
278
                            'messages_link' => $this->url()->fromRoute('inmail/message', ['id' => $user->uuid]),
278
                            'messages_link' => $this->url()->fromRoute('inmail/messages', ['id' => $user->uuid]),
279
                            'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
279
                            'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
280
                            'selected' => 1, // Marcar como seleccionado
280
                            'selected' => 1, // Marcar como seleccionado
281
                            'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
281
                            'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
282
                        ]);
282
                        ]);
283
                    }
283
                    }
Línea 345... Línea 345...
345
                    'filename' => $user->image
345
                    'filename' => $user->image
346
                ], ['force_canonical' => true]),
346
                ], ['force_canonical' => true]),
347
                'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
347
                'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
348
                'last_message' => $timeElapsedString,
348
                'last_message' => $timeElapsedString,
349
                'count_unread' => $unread,
349
                'count_unread' => $unread,
350
                'messages_link' => $this->url()->fromRoute('inmail/message', ['id' => $user->uuid]),
350
                'messages_link' => $this->url()->fromRoute('inmail/messages', ['id' => $user->uuid]),
351
                'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
351
                'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
352
                'selected' => 0, // No seleccionado
352
                'selected' => 0, // No seleccionado
353
                'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
353
                'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
354
            ]);
354
            ]);
355
        }
355
        }
Línea 382... Línea 382...
382
    }
382
    }
Línea 383... Línea 383...
383
 
383
 
384
    /**
384
    /**
385
     * Recupera los mensajes de una conversación específica entre usuarios
385
     * Recupera los mensajes de una conversación específica entre usuarios
386
     * 
386
     * 
387
     * Endpoint: GET /inmail/message/:id
387
     * Endpoint: GET /inmail/messages/:id
388
     * 
388
     * 
389
     * Parámetros de consulta:
389
     * Parámetros de consulta:
390
     * - page: número de página para paginación (opcional, por defecto 0)
390
     * - page: número de página para paginación (opcional, por defecto 0)
391
     * 
391
     * 
Línea 418... Línea 418...
418
     *   data: mensaje de error
418
     *   data: mensaje de error
419
     * ]
419
     * ]
420
     * 
420
     * 
421
     * @return \Laminas\View\Model\JsonModel
421
     * @return \Laminas\View\Model\JsonModel
422
     */
422
     */
423
    public function messageAction()
423
    public function messagesAction()
424
    {
424
    {
425
        $request = $this->getRequest();
425
        $request = $this->getRequest();
Línea 426... Línea 426...
426
        
426
        
427
        // Verificar que la petición sea GET
427
        // Verificar que la petición sea GET
Línea 840... Línea 840...
840
                'date' => $this->timeAgo($now, $now),
840
                'date' => $this->timeAgo($now, $now),
841
            ]
841
            ]
842
        ]);
842
        ]);
843
    }
843
    }
Línea 844... Línea -...
844
 
-
 
845
 
-
 
846
 
844
 
847
    /**
845
    /**
848
     *
846
     *
849
     * @param string $timestamp
847
     * @param string $timestamp
850
     * @param string $now
848
     * @param string $now
Línea 882... Línea 880...
882
            $timemsg = $this->translator->translate('LABEL_AGO_SMALL') . ' ' . $timemsg . '';
880
            $timemsg = $this->translator->translate('LABEL_AGO_SMALL') . ' ' . $timemsg . '';
883
        }
881
        }
884
        return $timemsg;
882
        return $timemsg;
885
    }
883
    }
Línea 886... Línea -...
886
 
-
 
887
 
884
 
888
    public function deleteAction()
885
    public function deleteAction()
889
    {
886
    {
890
        $request = $this->getRequest();
887
        $request = $this->getRequest();
891
        if ($request->isPost()) {
888
        if ($request->isPost()) {