Browse Source

選考 検索用文字列の対応

master
sosuke.iwabuchi 2 years ago
parent
commit
c6bca5f567
3 changed files with 34 additions and 1 deletions
  1. +6
    -0
      app/Kintone/Models/SeasonTicketContractSelection.php
  2. +24
    -0
      app/Logic/SeasonTicketContractSelectionManager.php
  3. +4
    -1
      resources/views/emails/members/selection_notice.blade.php

+ 6
- 0
app/Kintone/Models/SeasonTicketContractSelection.php View File

@@ -20,6 +20,9 @@ use Illuminate\Support\Collection;
* @property Collection<int, Entry> entryList
* @property Collection<int, Result> resultList
* @property string selectionMessage
* @property string searchCandidateListRecordNo
* @property string searchEntryListRecordNo
* @property string searchResultListEntryRecordNo
*/
class SeasonTicketContractSelection extends KintoneModel
{
@@ -84,6 +87,9 @@ class SeasonTicketContractSelection extends KintoneModel
self::FIELD_ENTRY_LIST => FieldType::SUBTABLE,
self::FIELD_RESULT_LIST => FieldType::SUBTABLE,
self::FIELD_SELECTION_MESSAGE => FieldType::MULTI_LINE_TEXT,
self::FIELD_SEARCH_CANDIDATE_LIST_RECORD_NO => FieldType::SINGLE_LINE_TEXT,
self::FIELD_SEARCH_ENTRY_LIST_RECORD_NO => FieldType::SINGLE_LINE_TEXT,
self::FIELD_SEARCH_RESULT_LIST_ENTRY_RECORD_NO => FieldType::SINGLE_LINE_TEXT,
];

protected const SUB_TABLES = [


+ 24
- 0
app/Logic/SeasonTicketContractSelectionManager.php View File

@@ -86,6 +86,15 @@ class SeasonTicketContractSelectionManager

$this->selection->status = SelectionStatus::TARGET_SELECTING;


// 検索用文字列の作成
$search = collect();
foreach ($this->selection->candidateList as $ele) {
$search->push(sprintf("c%dc", $ele->entryRecordNo));
}
$this->selection->searchCandidateListRecordNo = $search->implode(",");


return $this;
}

@@ -119,6 +128,13 @@ class SeasonTicketContractSelectionManager

$this->selection->selectionMessage = $messages->implode("\r\n");

// 検索用文字列の作成
$search = collect();
foreach ($this->selection->resultList as $ele) {
$search->push(sprintf("r%dr", $ele->entryRecordNo));
}
$this->selection->searchResultListEntryRecordNo = $search->implode(",");

return $this;
}

@@ -154,6 +170,14 @@ class SeasonTicketContractSelectionManager

$this->selection->entryList = $list;


// 検索用文字列の作成
$search = collect();
foreach ($this->selection->entryList as $ele) {
$search->push(sprintf("e%de", $ele->entryRecordNo));
}
$this->selection->searchEntryListRecordNo = $search->implode(",");

return $this;
}



+ 4
- 1
resources/views/emails/members/selection_notice.blade.php View File

@@ -3,6 +3,9 @@
@section('contents')
駐車場名:{{ $parking_name }}
下記URLより申込手続きを行ってください。

{{ $url }}


申込とキャンセルする場合は下記URLより承ります。
{{ $cancel_url }}
@endsection

Loading…
Cancel
Save