843 |
843 |
email=email,
|
844 |
844 |
ip=ip,
|
845 |
845 |
)
|
|
846 |
|
|
847 |
@endpoint(
|
|
848 |
name='platform',
|
|
849 |
pattern=r'^(?P<platform_id>[0-9]{1,10})/'
|
|
850 |
r'beneficiaire/(?P<beneficiary_id>[0-9]{1,10})/'
|
|
851 |
r'action/(?P<action_id>[0-9]{1,10})/$',
|
|
852 |
example_pattern='{platform_id}/beneficiaire/{beneficiary_id}/contrat/{action_id}/',
|
|
853 |
description=_('Get beneficiary action details'),
|
|
854 |
perm='can_access',
|
|
855 |
parameters=parameters(
|
|
856 |
{
|
|
857 |
'platform_id': {
|
|
858 |
'description': _('Platform numeric identifier'),
|
|
859 |
'example_value': '11',
|
|
860 |
},
|
|
861 |
'beneficiary_id': {
|
|
862 |
'description': _('Beneficiary numeric identifier'),
|
|
863 |
'example_value': '12',
|
|
864 |
},
|
|
865 |
'action_id': {
|
|
866 |
'description': _('Action numeric identifier'),
|
|
867 |
'example_value': '7',
|
|
868 |
},
|
|
869 |
}
|
|
870 |
),
|
|
871 |
display_category=_('Platform'),
|
|
872 |
display_order=10,
|
|
873 |
json_schema_response=response_schema(
|
|
874 |
{
|
|
875 |
'type': 'object',
|
|
876 |
'required': [
|
|
877 |
'id',
|
|
878 |
'contrat_id',
|
|
879 |
],
|
|
880 |
'properties': {
|
|
881 |
'id': {'type': 'integer'},
|
|
882 |
'contrat_id': {'type': 'integer'},
|
|
883 |
'sac': {'type': 'string'},
|
|
884 |
'libelle': {'type': 'string'},
|
|
885 |
'date_preconisation': DATE_SCHEMA,
|
|
886 |
'date_deb': DATE_SCHEMA,
|
|
887 |
'date_fin': DATE_SCHEMA,
|
|
888 |
'date_cloture': DATE_SCHEMA,
|
|
889 |
'moticlodac': {'type': 'string'},
|
|
890 |
'lib_moticlodac': {'type': 'string'},
|
|
891 |
'validation': {
|
|
892 |
'enum': ['En cours', 'Oui', 'Non'],
|
|
893 |
},
|
|
894 |
'financement': {
|
|
895 |
'properties': {
|
|
896 |
'montant_demande': {'type': 'integer'},
|
|
897 |
'montant_accorde': {'type': 'integer'},
|
|
898 |
}
|
|
899 |
},
|
|
900 |
'commentaire_ref': {'type': 'string'},
|
|
901 |
},
|
|
902 |
}
|
|
903 |
),
|
|
904 |
)
|
|
905 |
def platform_beneficiaire_action_detail(
|
|
906 |
self, request, platform_id, beneficiary_id, action_id, email, ip=None
|
|
907 |
):
|
|
908 |
return self.get(
|
|
909 |
'platform/%s/beneficiaire/%s/action/%s/' % (platform_id, beneficiary_id, action_id),
|
|
910 |
email=email,
|
|
911 |
ip=ip,
|
|
912 |
)
|