view.blade.php 9.58 KB
Newer Older
ZeMKI's avatar
ZeMKI committed
1
2
3
@extends('layouts.app')

@section('content')
ZeMKI's avatar
ZeMKI committed
4
5


ZeMKI's avatar
ZeMKI committed
6
    <div class="contrastbackground p-10">
ZeMKI's avatar
ZeMKI committed
7
        <div class="container mx-auto mx-auto mx-auto mx-auto">
Alessandro Belli's avatar
Alessandro Belli committed
8

ZeMKI's avatar
ZeMKI committed
9
10
            <h1 class="font-bold text-4xl">{{$study->name}}</h1>
            <p class="text-base">
ZeMKI's avatar
ZeMKI committed
11
                <strong class="">{{__('Interview done by')}}:</strong> {{$author}}<br>
ZeMKI's avatar
ZeMKI committed
12
13
14
15
16
                <strong class="">{{__('Interviewed')}}: </strong>{{$interview->interviewed}} <br>
                <strong class="">{{__('From')}}: </strong>{{date('d.m.Y H:i:s', strtotime($interview->start))}}
                - <strong class="">{{__('To')}}: </strong>{{date('d.m.Y H:i:s', strtotime($interview->end))}}
            </p>
            <hr>
Alessandro Belli's avatar
Alessandro Belli committed
17
18


ZeMKI's avatar
ZeMKI committed
19
20
21
22
23
            <h5 class="text-sm font-bold">
                {{$study->description}}
            </h5>
            <h1 class="title ">{{__('Sorting(s)')}}</h1>
            <?php $i = 1 ?>
Alessandro Belli's avatar
Alessandro Belli committed
24

ZeMKI's avatar
ZeMKI committed
25
26
27
            <div class="block mt-2">
                <b-tabs type="is-toggle" expanded>
                    @foreach($screenshots as $screenshot)
28

ZeMKI's avatar
ZeMKI committed
29
30
31
32
33
34
                        <b-tab-item :label="trans('Sorting')+' '+{{$i}}" icon="google-photos"><a href="
                                            {{url('/interview/'.$interview->id.'/sorting/'.$screenshot['type'].'/show')}}"
                                                                                                 target="_blank"><img
                                    src="{{$screenshot['image']}}"/></a>
                        </b-tab-item>
                        <?php $i++; ?>
35
                    @endforeach
ZeMKI's avatar
ZeMKI committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
                </b-tabs>
            </div>


            @forelse($createdtokens->unique('id') as $token)
                <h1 class="text-2xl font-bold">{{__('Created Tokens')}}</h1>
                <div class="block ml-2">
                    <img src="{{$token->image_path}}" alt="token created" class="block w-10"/>
                    {{$token->name}} - {{__('Created in Sorting')}}
                    : {{ json_decode($token->pivot->valutation)->sorting}}
                </div>

            @empty
                <h1 class="text-2xl font-bold">{{__('0 Created Tokens')}}</h1>

            @endforelse

                    <div class="my-2">
                    <h1 class="title ">{{__('Pre-Sort Phase')}}</h1>
Alessandro Belli's avatar
Alessandro Belli committed
55
56
57
58
59
60



                    @foreach($questions as $q)

                        @if($q->detail == "presort")
ZeMKI's avatar
ZeMKI committed
61
                            <h3 class="text-2xl bg-yellow-100 mb-2 mt-2 text-center">{{$q->question}}</h3>
Alessandro Belli's avatar
Alessandro Belli committed
62
63
64
65
66
                            <?php
                            $emptyopen = true;
                            ?>
                            @foreach($q->answers as $a)
                                @if($a->answer['answer'] != "" && $a->answer['type'] != "scale")
ZeMKI's avatar
ZeMKI committed
67
68
69
70
                                    <div
                                        class="text-white p-1 text-lg rounded bg-blue-600 w-auto inline-block">{{$a->answer['answer']}}</div>
                                    <div
                                        class="text-sm chosen-answer-type w-auto inline-block">{{$a->answer['type']}} {{__('answer')}}</div>
Alessandro Belli's avatar
Alessandro Belli committed
71
72
73
74
75
76
                                    <br>

                                @elseif($a->answer['type'] == "open")
                                    <?php
                                    $emptyopen = false;
                                    ?>
ZeMKI's avatar
ZeMKI committed
77
78
79
80
                                    <div
                                        class="text-white p-1 text-lg rounded bg-blue-600 w-auto inline-block">{{$a->pivot->result}}</div>
                                    <div
                                        class="bg-white text-black text-sm w-auto inline-block"> {{__('Open answer')}}</div>
Alessandro Belli's avatar
Alessandro Belli committed
81
82
83
                                    <br>
                                @elseif($a->answer['type'] == "scale")

ZeMKI's avatar
ZeMKI committed
84
85
86
                                    <div
                                        class="text-white p-1 text-lg rounded bg-blue-600 w-auto inline-block">{{$a->pivot->result}}</div>
                                    <div class="bg-white text-black text-sm"> {{__('Scale answer')}}</div>
Alessandro Belli's avatar
Alessandro Belli committed
87
88
89
90
91
92
                                    <br>
                                @endif

                            @endforeach

                            @foreach($q->available_answers as $available)
ZeMKI's avatar
ZeMKI committed
93

Alessandro Belli's avatar
Alessandro Belli committed
94
                                @if($available['type']== "multi" || $available['type']== "onechoice")
ZeMKI's avatar
ZeMKI committed
95

ZeMKI's avatar
ZeMKI committed
96
97
                                    <div
                                        class="bg-white text-black p-1 text-sm rounded available-answer w-auto inline-block">{{$available['answer']}}</div>
ZeMKI's avatar
ZeMKI committed
98

Alessandro Belli's avatar
Alessandro Belli committed
99
                                @elseif($available['type']== "scale")
ZeMKI's avatar
ZeMKI committed
100

ZeMKI's avatar
ZeMKI committed
101

Alessandro Belli's avatar
Alessandro Belli committed
102
103
                                    <br>
                                    <br>
ZeMKI's avatar
ZeMKI committed
104
105
106
107
108
                                    <strong
                                        class="bg-white text-black p-1 text-sm rounded available-answer w-auto inline-block">{{__('Minimum value')}} {{$available['answer']->min}}</strong>
                                    <br>
                                    <strong
                                        class="bg-white text-black p-1 text-sm rounded available-answer w-auto inline-block">{{__('Max value')}} {{$available['answer']->max}}</strong>
ZeMKI's avatar
ZeMKI committed
109

Alessandro Belli's avatar
Alessandro Belli committed
110
111
112
                                @else
                                    <br>
                                    @if($emptyopen)
ZeMKI's avatar
ZeMKI committed
113
114
                                        <strong
                                            class="bg-white text-black p-1 text-sm rounded available-answer w-auto inline-block"> {{__('Empty open answer')}} </strong>
Alessandro Belli's avatar
Alessandro Belli committed
115
                                    @else
ZeMKI's avatar
ZeMKI committed
116
117
                                        <strong
                                            class="bg-white text-black p-1 text-sm rounded w-auto inline-block"> {{__('Open Answer')}}</strong>
Alessandro Belli's avatar
Alessandro Belli committed
118
                                    @endif
ZeMKI's avatar
ZeMKI committed
119

Alessandro Belli's avatar
Alessandro Belli committed
120
                                @endif
ZeMKI's avatar
ZeMKI committed
121

Alessandro Belli's avatar
Alessandro Belli committed
122
                            @endforeach
ZeMKI's avatar
ZeMKI committed
123

Alessandro Belli's avatar
Alessandro Belli committed
124
                        @endif
ZeMKI's avatar
ZeMKI committed
125

ZeMKI's avatar
ZeMKI committed
126

Alessandro Belli's avatar
Alessandro Belli committed
127
128
                    @endforeach
                    </div>
ZeMKI's avatar
ZeMKI committed
129
130

                    <h1 class="title ">{{__('Post-Sort Phase')}}</h1>
ZeMKI's avatar
ZeMKI committed
131

Alessandro Belli's avatar
Alessandro Belli committed
132
                    @foreach($questions as $q)
ZeMKI's avatar
ZeMKI committed
133

Alessandro Belli's avatar
Alessandro Belli committed
134
                        @if($q->detail == "postsort")
ZeMKI's avatar
ZeMKI committed
135
                            <h3 class="text-2xl bg-yellow-100 mb-2 mt-2 text-center">{{$q->question}}</h3>
Alessandro Belli's avatar
Alessandro Belli committed
136
137
138
139
140
                            <?php
                            $emptyopen = true;
                            ?>
                            @foreach($q->answers as $a)
                                @if($a->answer['answer'] != "" && $a->answer['type'] != "scale")
ZeMKI's avatar
ZeMKI committed
141
142
143
144
                                    <div
                                        class="text-white p-1 text-lg rounded bg-blue-600 w-auto inline-block">{{$a->answer['answer']}}</div>
                                    <div
                                        class="bg-white text-black text-sm">{{$a->answer['type']}} {{__('answer')}}</div>
Alessandro Belli's avatar
Alessandro Belli committed
145
                                    <br>
ZeMKI's avatar
ZeMKI committed
146

Alessandro Belli's avatar
Alessandro Belli committed
147
148
149
150
                                @elseif($a->answer['type'] == "open")
                                    <?php
                                    $emptyopen = false;
                                    ?>
ZeMKI's avatar
ZeMKI committed
151
152
153
154
                                    <div
                                        class="text-white p-1 text-lg rounded bg-blue-600 w-auto inline-block">{{$a->pivot->result}}</div>
                                    <div
                                        class="bg-white text-black text-sm w-auto inline-block"> {{__('Open answer')}}</div>
Alessandro Belli's avatar
Alessandro Belli committed
155
156
                                    <br>
                                @elseif($a->answer['type'] == "scale")
ZeMKI's avatar
ZeMKI committed
157

ZeMKI's avatar
ZeMKI committed
158
159
160
161
                                    <div
                                        class="text-white p-1 text-lg rounded bg-blue-600 w-auto inline-block">{{$a->pivot->result}}</div>
                                    <div
                                        class="bg-white text-black text-sm w-auto inline-block"> {{__('Scale answer')}}</div>
Alessandro Belli's avatar
Alessandro Belli committed
162
163
                                    <br>
                                @endif
ZeMKI's avatar
ZeMKI committed
164

Alessandro Belli's avatar
Alessandro Belli committed
165
                            @endforeach
ZeMKI's avatar
ZeMKI committed
166

Alessandro Belli's avatar
Alessandro Belli committed
167
                            @foreach($q->available_answers as $available)
ZeMKI's avatar
ZeMKI committed
168

Alessandro Belli's avatar
Alessandro Belli committed
169
                                @if($available['type']== "multi" || $available['type']== "onechoice")
ZeMKI's avatar
ZeMKI committed
170

ZeMKI's avatar
ZeMKI committed
171
172
                                    <div
                                        class="bg-white text-black p-1 text-sm rounded w-auto inline-block">{{$available['answer']}}</div>
ZeMKI's avatar
ZeMKI committed
173

Alessandro Belli's avatar
Alessandro Belli committed
174
                                @elseif($available['type']== "scale")
ZeMKI's avatar
ZeMKI committed
175

ZeMKI's avatar
ZeMKI committed
176
177
                                    <strong
                                        class="bg-white text-black p-1 text-sm rounded w-auto inline-block mb-2 mt-2">{{__('Minimum value')}} {{$available['answer']->min}}</strong>
Alessandro Belli's avatar
Alessandro Belli committed
178
                                    <br>
ZeMKI's avatar
ZeMKI committed
179
180
                                    <strong
                                        class="bg-white text-black p-1 text-sm rounded w-auto inline-block">{{__('Max value')}} {{$available['answer']->max}}</strong>
ZeMKI's avatar
ZeMKI committed
181

Alessandro Belli's avatar
Alessandro Belli committed
182
183
                                @else
                                    @if($emptyopen)
ZeMKI's avatar
ZeMKI committed
184
185
                                        <strong
                                            class="bg-white text-black p-1 text-sm rounded available-answer w-auto inline-block"> {{__('Empty open answer')}} </strong>
Alessandro Belli's avatar
Alessandro Belli committed
186
                                    @else
ZeMKI's avatar
ZeMKI committed
187
188
                                        <strong
                                            class="bg-white text-black p-1 text-sm rounded w-auto inline-block"> {{__('Open Answer')}}</strong>
Alessandro Belli's avatar
Alessandro Belli committed
189
                                    @endif
ZeMKI's avatar
ZeMKI committed
190

Alessandro Belli's avatar
Alessandro Belli committed
191
                                @endif
ZeMKI's avatar
ZeMKI committed
192

Alessandro Belli's avatar
Alessandro Belli committed
193
                            @endforeach
ZeMKI's avatar
ZeMKI committed
194

Alessandro Belli's avatar
Alessandro Belli committed
195
                        @endif
ZeMKI's avatar
ZeMKI committed
196
197


ZeMKI's avatar
ZeMKI committed
198

Alessandro Belli's avatar
Alessandro Belli committed
199
200
201
                    @endforeach
        </div>
    </div>
ZeMKI's avatar
ZeMKI committed
202
203


ZeMKI's avatar
ZeMKI committed
204

ZeMKI's avatar
ZeMKI committed
205
@endsection
Alessandro Belli's avatar
Alessandro Belli committed
206