.container-fluid .row .col-md-3 = render partial: "respondent_categories/sidebar" .col-md-9 = render_breadcrumbs([ \ { name: 'Home', path: projects_path }, \ { name: @project.title, path: project_path(@project) }, \ { name: @respondent_category.name, path: [@project, @respondent_category] }, \ { name: "Assistant" } \ ]) .d-flex h4= t(:setup_assistant) - if @assistant_generating .alert.alert-info .d-flex.align-items-center .span.spinner.spinner-lg | Assistant is being generated. Please refresh the page after some time - else - if @respondent_category.ready_for_assistant? .alert.alert-info .d-flex.justify-content-between | There are #{@respondent_category.respondents.count} transcripts in this sub-project. = button_to t(:create_assistant), create_assistant_project_respondent_category_path(@project, @respondent_category), method: :post, data: { turbo_confirm: "Are you sure you want to create an assistant for this sub-project?" }, class: "btn btn-outline-dark" - else - if @respondent_category.respondents.count.zero? .alert.alert-danger strong | The assistant cannot be configured due to the following missing data: br | There are no respondents in this category. - else .alert.alert-danger - problematic_respondents = @respondent_category.respondents.select{|x|x.docx_transcript.nil? && x.whisper_transcript.nil?} p.mb-3 strong i.bi.bi-exclamation-triangle.me-1 | The assistant cannot be configured due to the following missing data: | There #{problematic_respondents.count == 1 ? "is" : "are"} #{pluralize(problematic_respondents.count, "respondent")} with no transcribed conversation (neither manual nor automatic) ul.my-3 - problematic_respondents.each do |r| li= link_to r.name, [@project, @respondent_category, r]